Files
diskless-workstation/serving/kiosk-app/nginx.conf
T
2026-06-18 12:03:45 +00:00

26 lines
872 B
Nginx Configuration File

# Internal nginx for the kiosk SPA container. The main serving nginx proxies
# /kiosk/ here with the prefix stripped (proxy_pass .../;), so requests arrive
# at this server rooted at "/". try_files gives the SPA fallback; routing is
# hash-based anyway, so this fallback only matters for a hard refresh on "/".
server {
listen 80 default_server;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Don't cache the entry document (so a new build is picked up immediately);
# the hashed assets under /assets/ are immutable and cached hard.
location = /index.html {
add_header Cache-Control "no-cache";
}
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
}
location / {
try_files $uri $uri/ /index.html;
}
}