Skip to content

fix: home assistant proxy #1235#1239

Open
flobz wants to merge 1 commit into
masterfrom
fix/proxy
Open

fix: home assistant proxy #1235#1239
flobz wants to merge 1 commit into
masterfrom
fix/proxy

Conversation

@flobz

@flobz flobz commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Use dash_app.get_asset_url() to ensure image paths respect the X-Ingress-Path header (requests_pathname_prefix).

Changes

  • Update all SVG image paths in control.py, figures.py, and views.py to use get_asset_url() instead of hardcoded 'assets/images/...' paths
  • Add test_svg_images_with_ingress_path() to verify image paths contain the correct prefix when X-Ingress-Path header is present

Fixes

Image paths were not prefixed in Home Assistant ingress proxy setups, causing 404 errors for SVG images.

Test

New integration test validates that all image src attributes in the HTML output contain the correct ingress prefix.

@flobz flobz changed the title test: add test for svg image paths with HA ingress prefix fix: home assistant proxy #1235 Jun 25, 2026
Use dash_app.get_asset_url() to ensure image paths respect the
X-Ingress-Path header (requests_pathname_prefix).

- Update all SVG image paths in control.py, figures.py, and views.py
  to use get_asset_url() instead of hardcoded 'assets/images/...' paths
- Add test_svg_images_with_ingress_path() to verify image paths
  contain the correct prefix when X-Ingress-Path header is present

Fixes issue where image paths were not prefixed in Home Assistant
ingress proxy setups.
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