mirror of
https://github.com/gadgethd/ukmesh.git
synced 2026-09-10 09:05:34 +00:00
31 lines
794 B
Plaintext
31 lines
794 B
Plaintext
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
resolver 127.0.0.11 valid=10s ipv6=off;
|
|
|
|
# Proxy API calls through to the app service so live stats work
|
|
location /api/ {
|
|
set $backend_api_upstream http://backend:3000;
|
|
proxy_pass $backend_api_upstream;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
# SPA fallback — all routes serve index.html
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /index.html {
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
}
|
|
}
|