Skip to content

Commit

Permalink
Trying to add no-cache to Nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaknarfen committed Dec 12, 2018
1 parent 5155bd9 commit d8d86c7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .ebextensions/proxy.config
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ files:
return 301 https://$host$request_uri;
}

# kill cache
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;

proxy_pass http://nodejs;
proxy_set_header Connection "";
proxy_http_version 1.1;
Expand All @@ -65,6 +72,10 @@ files:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
}

gzip on;
gzip_comp_level 6;
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
Expand Down

0 comments on commit d8d86c7

Please sign in to comment.