diff --git a/docker/nginx-staging.conf b/docker/nginx-staging.conf index e885fcf0..20140773 100644 --- a/docker/nginx-staging.conf +++ b/docker/nginx-staging.conf @@ -8,14 +8,6 @@ server { gzip_comp_level 5; gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - - auth_basic "Staging site"; - auth_basic_user_file /etc/nginx/.htpasswd; - } - location ~* \.(html)$ { etag off; if_modified_since off; @@ -23,9 +15,19 @@ server { } location ~* \.(ico|jpg|jpeg|png|js|css|woff|woff2)$ { + etag off; + if_modified_since off; add_header Cache-Control "public max-age=31536000 immutable" } + location / { + root /usr/share/nginx/html; + index index.html index.htm; + + auth_basic "Staging site"; + auth_basic_user_file /etc/nginx/.htpasswd; + } + error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html;