Serve the panel from a sub-path, and an Apache conf for /heos
The app assumed it lived at the server root: its links were /static/... and its fetches /api/..., which behind a proxy at /heos resolve to the wrong place, so the page would load and nothing on it would work. It now takes the prefix from X-Forwarded-Prefix, and everything it generates -- stylesheet, icons, the manifest's start_url, every fetch -- follows. Nothing changes when it is served from its own port. deploy/heos.conf is the Apache side, restricted to the local network by default, since this controls the speakers and the vhost it hangs off has a public certificate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en" data-step="{{ step }}" data-host="{{ host.label }}">
|
||||
<html lang="en" data-step="{{ step }}" data-host="{{ host.label }}" data-base="{{ url_for('index') }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "{{ app_name }}",
|
||||
"short_name": "{{ app_name }}",
|
||||
"start_url": "/",
|
||||
"start_url": "{{ url_for('index') }}",
|
||||
"display": "standalone",
|
||||
"background_color": "#0a0d14",
|
||||
"theme_color": "#0a0d14",
|
||||
"icons": [
|
||||
{ "src": "/static/icon-180.png", "sizes": "180x180", "type": "image/png" },
|
||||
{ "src": "/static/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" }
|
||||
{ "src": "{{ url_for('static', filename='icon-180.png') }}", "sizes": "180x180", "type": "image/png" },
|
||||
{ "src": "{{ url_for('static', filename='icon-512.png') }}", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" }
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user