1
0
Fork 0

Nginx cache rules

This commit is contained in:
Gregory Eremin 2015-03-20 22:47:14 +07:00
parent ecb95882d6
commit eff7d6e39b
1 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@ server {
rewrite ^/app/(.*) /app.html last; rewrite ^/app/(.*) /app.html last;
} }
location ~ ^/(auth|api)/ { location ~ ^/(auth|api)/ {
add_header Cache-Control private;
proxy_pass http://empact; proxy_pass http://empact;
} }
@ -24,7 +25,9 @@ server {
} }
location ~ .*\.(js|css|png)$ { location ~ .*\.(js|css|png)$ {
add_header Cache-Control public; add_header Cache-Control public;
expires max; add_header Last-Modified $sent_http_Expires;
expires 1h;
etag on;
gzip_static on; gzip_static on;
gzip on; gzip on;
gzip_proxied any; gzip_proxied any;