Skip to content

Commit d4d833d

Browse files
SergeySergey
authored andcommitted
edit nginx
1 parent bf71b1a commit d4d833d

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

.nginx/nginx.conf

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ server {
99
add_header X-Frame-Options "SAMEORIGIN" always;
1010
add_header X-Content-Type-Options "nosniff" always;
1111
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
12+
13+
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
1214

1315
add_header Cross-Origin-Opener-Policy "same-origin" always;
1416
add_header Cross-Origin-Embedder-Policy "require-corp" always;
@@ -20,23 +22,23 @@ server {
2022

2123
location / {
2224
try_files $uri $uri/ /index.html;
23-
24-
location ~* \.html$ {
25-
expires -1;
26-
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
27-
add_header Content-Security-Policy "
28-
default-src 'self';
29-
script-src 'self';
30-
style-src 'self' https://fonts.googleapis.com;
31-
font-src 'self' https://fonts.gstatic.com;
32-
img-src 'self' data: https:;
33-
connect-src 'self' https:;
34-
frame-ancestors 'none';
35-
base-uri 'self';
36-
form-action 'self';
37-
upgrade-insecure-requests;
38-
" always;
39-
}
25+
}
26+
27+
location ~* \.html$ {
28+
expires -1;
29+
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
30+
add_header Content-Security-Policy "
31+
default-src 'self';
32+
script-src 'self';
33+
style-src 'self' https://fonts.googleapis.com;
34+
font-src 'self' https://fonts.gstatic.com;
35+
img-src 'self' data: https:;
36+
connect-src 'self' https:;
37+
frame-ancestors 'none';
38+
base-uri 'self';
39+
form-action 'self';
40+
upgrade-insecure-requests;
41+
" always;
4042
}
4143

4244
location /static {

0 commit comments

Comments
 (0)