Files

57 lines
1.9 KiB
Nginx Configuration File

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_min_length 1024;
gzip_types application/javascript application/wasm application/octet-stream text/css;
location = /healthz {
access_log off;
default_type text/plain;
return 200 "ok\n";
}
location ^~ /api/ {
proxy_pass http://step3-api;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_connect_timeout 10s;
proxy_read_timeout 60s;
}
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
add_header X-Content-Type-Options "nosniff" always;
try_files $uri =404;
}
location ~ ^/(terms\.html|privacy\.html|legal-page\.(css|js)|legal/legal_documents\.json|external-redirect\.html)$ {
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
add_header X-Content-Type-Options "nosniff" always;
try_files $uri =404;
}
# Godot exports reuse these filenames across releases. Revalidate them so a
# newly deployed index never boots an older cached project package.
location ~ ^/(index\.(js|pck|wasm)|medmind-inter\.ttf)$ {
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
add_header X-Content-Type-Options "nosniff" always;
try_files $uri =404;
}
location = /ranaze-loader-icon-v1.png {
add_header Cache-Control "public, max-age=31536000, immutable" always;
add_header X-Content-Type-Options "nosniff" always;
try_files $uri =404;
}
location / {
add_header Cache-Control "public, max-age=3600" always;
add_header X-Content-Type-Options "nosniff" always;
try_files $uri $uri/ /index.html;
}
}