Files
FaroeGames 6b693cc3c6 Add Legends: Arceus tracker and bundle offline sprites on dev
Add standalone Pokémon Legends: Arceus POC tracker (Hisui 242 Pokédex, Research Tasks & RL10 mode, Satchel MP & Save Mythicals toggles, Noble/story battles, saves/movesets), bundle local sprite packs across all three trackers into Git/Docker/Nginx with attribution credits, and update Hub landing page & unified server/tests.
2026-11-17 17:53:59 -07:00

75 lines
2.0 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/;
}
location = /legends-arceus {
return 301 /legends-arceus/;
}
# Asset-status probe endpoints (serves .ready.json if local sprites are bind-mounted/bundled, otherwise false)
location = /oras/api/assets-status {
default_type application/json;
try_files /oras/assets/sprites/.ready.json @assets_unavailable;
}
location = /luminescent-platinum/api/assets-status {
default_type application/json;
try_files /luminescent-platinum/assets/sprites/.ready.json @assets_unavailable;
}
location = /legends-arceus/api/assets-status {
default_type application/json;
try_files /legends-arceus/assets/sprites/.ready.json @assets_unavailable;
}
location @assets_unavailable {
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 ~* \.(?:png|webp|svg|ico)$ {
expires 7d;
add_header Cache-Control "public, max-age=604800";
try_files $uri =404;
}
location / {
try_files $uri $uri/ =404;
}
}