From a0ebbf79a37e7fc8f46403f8bf2622b7c35733f3 Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Wed, 11 Dec 2024 14:30:40 -0500 Subject: [PATCH] Reduced expiration duration for static assets in prod nginx config --- docker/config/nginx/nginx-production.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/config/nginx/nginx-production.conf b/docker/config/nginx/nginx-production.conf index e3b4ea352..d7deb372d 100644 --- a/docker/config/nginx/nginx-production.conf +++ b/docker/config/nginx/nginx-production.conf @@ -135,9 +135,10 @@ http { # Directives to send expires headers and turn off 404 error logging. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|js|css|json|obj)$ { - access_log off; + access_log off; log_not_found off; - expires max; + expires 1w; + add_header Cache-Control "max-age=604800, public"; } # deny direct access to any php files