-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod.conf
45 lines (37 loc) · 1.2 KB
/
prod.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
server {
server_name 192.168.1.14;
listen 80;
# listen 443 ssl;
# ssl_certificate ssl_cert/server.crt;
# ssl_certificate_key ssl_cert/server.key;
# #配置共享会话缓存大小
# ssl_session_cache shared:SSL:10m;
# #配置会话超时时间
# ssl_session_timeout 10m;
keepalive_timeout 70;
#减少点击劫持
add_header X-Frame-Options DENY;
#禁止服务器自动解析资源类型
add_header X-Content-Type-Options nosniff;
#防XSS攻擊
add_header X-Xss-Protection 1;
#HSTS策略
#add_header Strict-Transport-Security "max-age=1000; includeSubDomains; preload" always;
server_tokens off;
root /var/www/app;
index index.html;
client_max_body_size 10G;
gzip on;
gzip_min_length 1k;
gzip_comp_level 6;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/x-javascript text/css application/xml application/javascript application/json model/gltf+json;
location / {
try_files $uri $uri/ /index.html;
# add_header Cache-Control “no-store, no-cache, must-revalidate”;
add_header Cache-Control "max-age=600";
}
location /assets {
add_header Cache-Control "max-age=31536000";
}
}