summaryrefslogtreecommitdiffstats
path: root/templates/nginx.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/nginx.j2')
-rw-r--r--templates/nginx.j22
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/nginx.j2 b/templates/nginx.j2
index 47e03a2..df0e6ac 100644
--- a/templates/nginx.j2
+++ b/templates/nginx.j2
@@ -62,6 +62,7 @@ server {
deny all;
}
+ {% if nginx_cache_static %}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# cache static assets and compress them
gzip on;
@@ -69,6 +70,7 @@ server {
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
+ {% endif %}
{{ nginx_custom }}
}