Skip to content

Commit

Permalink
#MOR-13: anti cache headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mguikema committed Sep 23, 2024
1 parent 5cc1fcc commit 192a93e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion nginx/nginx-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ server {

location / {
proxy_pass http://localhost:8000;
expires 0;
add_header Cache-Control "no-cache, no-store";
add_header Pragma no-cache;
}

location /media {
proxy_pass http://localhost:8000/media;
access_log off;
expires 30d;
add_header Vary Accept-Encoding;
add_header Access-Control-Allow-Origin *;
expires 0;
add_header Cache-Control "no-cache, no-store";
add_header Pragma no-cache;
}

location /static {
Expand Down
7 changes: 6 additions & 1 deletion nginx/nginx-default.development.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ server {

location / {
proxy_pass http://planr_app:8000;
expires 0;
add_header Cache-Control "no-cache, no-store";
add_header Pragma no-cache;
}

location /static {
Expand All @@ -27,9 +30,11 @@ server {
location /media {
proxy_pass http://planr_app:8000/media;
access_log off;
expires 30d;
add_header Vary Accept-Encoding;
add_header Access-Control-Allow-Origin *;
expires 0;
add_header Cache-Control "no-cache, no-store";
add_header Pragma no-cache;
}

location /stats {
Expand Down

0 comments on commit 192a93e

Please sign in to comment.