From eff7d6e39b57f02899ea82e3bb72a3eea6de1acf Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Fri, 20 Mar 2015 22:47:14 +0700 Subject: [PATCH] Nginx cache rules --- nginx.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 96876fb..fcb7632 100644 --- a/nginx.conf +++ b/nginx.conf @@ -16,6 +16,7 @@ server { rewrite ^/app/(.*) /app.html last; } location ~ ^/(auth|api)/ { + add_header Cache-Control private; proxy_pass http://empact; } @@ -24,7 +25,9 @@ server { } location ~ .*\.(js|css|png)$ { add_header Cache-Control public; - expires max; + add_header Last-Modified $sent_http_Expires; + expires 1h; + etag on; gzip_static on; gzip on; gzip_proxied any;