Files
nuzlocke-tracker/frontend/nginx.conf
Julian Tabel 174b145e84
All checks were successful
CI / backend-lint (push) Successful in 7s
CI / frontend-lint (push) Successful in 30s
Fix webp sprites not loading in production nginx
Include mime.types at the server block level to ensure .webp files
are served with the correct Content-Type (image/webp).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:23:58 +01:00

23 lines
568 B
Nginx Configuration File

server {
listen 80;
include /etc/nginx/mime.types;
root /usr/share/nginx/html;
index index.html;
# Proxy API requests to the backend service
location /api/ {
proxy_pass http://api:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Serve static files, fall back to index.html for SPA routing
location / {
try_files $uri $uri/ /index.html;
}
}