nocode-workflow / nginx.conf
xingyuanzhao's picture
Cursor
Fix nginx: no-cache for index.html, immutable for hashed assets
da84390
Raw History Blame Contribute Delete
1.06 kB
worker_processes 1;
pid /tmp/nginx.pid;
error_log /dev/stderr;
events {
worker_connections 128;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
server {
listen 7860;
location /api/ {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off;
proxy_read_timeout 300s;
}
location /openapi.json {
proxy_pass http://127.0.0.1:8000;
}
location /assets/ {
root /app/gui-dist;
expires 1y;
add_header Cache-Control "public, immutable";
}
location / {
root /app/gui-dist;
index index.html;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}
}
}