-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec-settings.conf
105 lines (82 loc) · 2.59 KB
/
spec-settings.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
##
# Basic Settings
##
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
server_tokens off;
underscores_in_headers on;
# allow '.' chars in headers
ignore_invalid_headers off;
keepalive_timeout 315;
keepalive_requests 10000;
client_header_timeout 4m;
client_body_timeout 4m;
send_timeout 4m;
reset_timedout_connection on;
aio threads=default;
client_max_body_size 512M;
# 414 prevention
client_header_buffer_size 256k;
large_client_header_buffers 8 1024k;
# http
proxy_buffers 8 16k; # Buffer pool = 8 buffers of 16k
proxy_buffer_size 16k; # 16k of buffers from pool used for headers
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
##
# Timeout Settings
##
proxy_connect_timeout 240s;
proxy_send_timeout 240s;
proxy_read_timeout 240s;
fastcgi_send_timeout 600s;
fastcgi_read_timeout 600s;
##
# Proxy Forwarding
##
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
##
# Brotli Settings
##
brotli on;
brotli_comp_level 4;
#brotli_buffers 32 8k;
brotli_min_length 100;
brotli_static on;
brotli_types image/jpeg image/bmp image/svg+xml text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
gzip_proxied any;
gzip_comp_level 2;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# FastCGI Cache
##
add_header Fastcgi-Cache $upstream_cache_status;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_intercept_errors on;
fastcgi_cache_path /tmp/cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
##
# Security
##
#add_header Content-Security-Policy "default-src 'self' https: data: 'unsafe-inline' 'unsafe-eval';" always;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
add_header Referrer-Policy "strict-origin";
add_header Permissions-Policy "geolocation=(),midi=(),sync-xhr=(),microphone=(),camera=(),magnetometer=(),gyroscope=(),fullscreen=(self)";