59 lines
2.0 KiB
Nginx Configuration File
59 lines
2.0 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 https://s3q.ranaze.com;
|
|
proxy_ssl_server_name on;
|
|
proxy_ssl_name s3q.ranaze.com;
|
|
proxy_set_header Host s3q.ranaze.com;
|
|
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;
|
|
}
|
|
}
|