- icon.svg / icon-192/512.png: blue→purple equalizer gradient design - nginx.conf: add /app/ alias so reverse-proxy prefix resolves assets - vite.config.js: base /app/ + %BASE_URL% in favicon links so path resolves correctly whether app is served at / or /app/ - ic_launcher.xml: same equalizer design for Android app icon Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
1.4 KiB
Nginx Configuration File
49 lines
1.4 KiB
Nginx Configuration File
server {
|
||
listen 80;
|
||
server_name _;
|
||
root /usr/share/nginx/html;
|
||
index index.html;
|
||
|
||
gzip on;
|
||
gzip_types text/css application/javascript application/json image/svg+xml;
|
||
gzip_min_length 1024;
|
||
|
||
# index.html – never cache so SW updates are picked up immediately
|
||
location = /index.html {
|
||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||
}
|
||
|
||
# Static assets – long-term cache (cache busted by SW version)
|
||
location ~* \.(css|js)$ {
|
||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||
}
|
||
|
||
# Service worker – no cache so browser always gets the latest version
|
||
location = /sw.js {
|
||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||
add_header Service-Worker-Allowed "/";
|
||
}
|
||
|
||
# Runtime config – never cache so NAVIDROME_URL changes are picked up
|
||
location = /config.js {
|
||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||
}
|
||
|
||
# Manifest – short cache so icon/name updates roll out quickly
|
||
location = /manifest.json {
|
||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||
add_header Access-Control-Allow-Origin "*";
|
||
}
|
||
|
||
# /app/ alias so the reverse proxy prefix resolves static assets correctly
|
||
location /app/ {
|
||
alias /usr/share/nginx/html/;
|
||
try_files $uri /index.html;
|
||
}
|
||
|
||
# SPA fallback
|
||
location / {
|
||
try_files $uri $uri/ /index.html;
|
||
}
|
||
}
|