# 发版后避免浏览器长期使用旧 index 引用旧 js/css server { listen 80; server_name localhost; client_max_body_size 100m; root /usr/share/nginx/html; index index.html; location = /index.html { add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always; add_header Pragma "no-cache" always; } location ^~ /static/ { expires 1y; add_header Cache-Control "public, immutable" always; access_log off; } location /it/api/ { proxy_pass http://172.18.0.1:5010; 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; } location / { try_files $uri $uri/ /index.html; } }