]> Untitled Git - lemmy.git/commitdiff
Adding image caching via immutable to ansible. #371 #408
authorDessalines <tyhou13@gmx.com>
Sun, 12 Jan 2020 17:54:23 +0000 (12:54 -0500)
committerDessalines <tyhou13@gmx.com>
Sun, 12 Jan 2020 17:58:06 +0000 (12:58 -0500)
ansible/templates/nginx.conf

index 4af5be01cc26e492f04bb95995b7ea3de626b19d..0a420d77797a8ac5e23a6c565e8ad2510546e2f4 100644 (file)
@@ -68,8 +68,7 @@ server {
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 
       if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) {
-        add_header Cache-Control "public";
-        expires max;
+        add_header Cache-Control "public, max-age=31536000, immutable";
       }   
     }
 }