58 lines
1.4 KiB
Nginx Configuration File
58 lines
1.4 KiB
Nginx Configuration File
server {
|
|
listen 28473;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Ensure redirects preserve the external domain & HTTPS protocol behind reverse proxies
|
|
absolute_redirect off;
|
|
port_in_redirect off;
|
|
|
|
include /etc/nginx/mime.types;
|
|
types {
|
|
application/javascript mjs;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
|
|
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
location = /health {
|
|
access_log off;
|
|
default_type application/json;
|
|
return 200 '{"status":"ok"}';
|
|
}
|
|
|
|
# Trailing-slash redirects so relative ./src/* imports resolve inside each tracker folder
|
|
location = /oras {
|
|
return 301 /oras/;
|
|
}
|
|
location = /luminescent-platinum {
|
|
return 301 /luminescent-platinum/;
|
|
}
|
|
|
|
# Asset-status probe endpoints (returns false unless bind-mounted offline sprite check overrides)
|
|
location = /oras/api/assets-status {
|
|
default_type application/json;
|
|
return 200 '{"hasLocalSprites":false}';
|
|
}
|
|
location = /luminescent-platinum/api/assets-status {
|
|
default_type application/json;
|
|
return 200 '{"hasLocalSprites":false}';
|
|
}
|
|
|
|
location ~* \.(?:html|js|mjs|css|json)$ {
|
|
add_header Cache-Control "no-cache";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|