server {
    listen       80;
    server_name  _;
    root         /usr/share/nginx/html;

    gzip on;
    gzip_types text/css application/javascript application/json image/svg+xml;
    gzip_vary on;

    # SPA fallback
    location / {
        try_files $uri /index.html;
    }

    # 可选的 API 代理，取消注释并改 backend 地址即可
    # location /api/ {
    #     proxy_pass http://backend:8080;
    #     proxy_set_header Host $host;
    #     proxy_set_header X-Real-IP $remote_addr;
    # }
}
