Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Commit 767d59e

Browse files
author
Adam A. Zerella
committed
Added proper no-cache headers to all file requests
1 parent f2a8151 commit 767d59e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.deploy/nginx/nginx-production.conf

+1-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ http {
4242
location / {
4343
root ./;
4444
try_files $uri $uri.html $uri/ $uri/index.html =404;
45-
}
46-
47-
location ~* \.(html|htm)$ {
48-
add_header Cache-Control "no-cache";
45+
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
4946
}
5047

5148
}

.deploy/nginx/nginx-testing.conf

+1-4
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@ http {
4444
location / {
4545
root ./;
4646
try_files $uri $uri.html $uri/ $uri/index.html =404;
47+
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
4748
}
4849

4950
location /robots.txt {
5051
add_header Content-Type text/plain;
5152
return 200 "User-agent: *\nDisallow: *";
5253
}
5354

54-
location ~* \.(html|htm)$ {
55-
add_header Cache-Control "no-cache";
56-
}
57-
5855
}
5956
}

0 commit comments

Comments
 (0)