Files
everything-is-suitable/everything-is-suitable-uniapp/nginx.conf
T
zhangxiang 7d93c13b18 chore: 完成v1.0.0最终验收,更新测试报告与文档
新增CSP安全配置与对应测试用例,补充并发负载测试,更新README进度与统计数据,新增最终验收报告与测试计划文档,修复已知测试问题
2026-08-13 09:31:11 +08:00

28 lines
899 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/json;
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-src 'none'; object-src 'none'";
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}