Files
accounting-frontend/nginx.conf
Shayan Azadi 92d7afc103 Harden withdrawals freshness and add معین/تفصیل on accounting vouchers.
Cache-bust and soft-refresh withdrawal lists for CDN, and capture party detail (تفصیل) plus بابت purpose on journal documents.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 19:21:37 +03:30

50 lines
1.4 KiB
Nginx Configuration File

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/xml+rss
application/json;
# Never cache the shell HTML — otherwise CDN/browsers keep an old index
# that points at a previous JS bundle (stale withdrawals desk).
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate" always;
add_header Pragma "no-cache" always;
expires -1;
try_files /index.html =404;
}
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
location /health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
}