Skip to content

Comments

feat: Home Assistant Addon ingress compatiability#593

Open
deftdawg wants to merge 1 commit intofatihak:mainfrom
deftdawg:ha-ingress-support
Open

feat: Home Assistant Addon ingress compatiability#593
deftdawg wants to merge 1 commit intofatihak:mainfrom
deftdawg:ha-ingress-support

Conversation

@deftdawg
Copy link
Contributor

  • Add IngressMiddleware that reads X-Ingress-Path header to set SCRIPT_NAME, making all url_for() calls automatically prefix the ingress base path
  • Fix hardcoded /plugin_instance_image/ URL in playlist.html to use url_for() instead
  • Works transparently for both direct access and HA ingress
  • Support PORT env var for configurable listen port

Changes required to allow running both outside AND inside a Home Assistant ingress path where content is served from a baseURL something like this /api/hassio_ingress/<random uuid>/ rather than /:

 - Add IngressMiddleware that reads X-Ingress-Path header to set SCRIPT_NAME, making all url_for() calls automatically prefix the ingress base path
 - Fix hardcoded /plugin_instance_image/ URL in playlist.html to use url_for() instead
 - Works transparently for both direct access and HA ingress
- Support PORT env var for configurable listen port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant