]> Untitled Git - lemmy.git/commitdiff
Adding image cache max.
authorDessalines <tyhou13@gmx.com>
Sun, 8 Sep 2019 18:32:39 +0000 (11:32 -0700)
committerDessalines <tyhou13@gmx.com>
Sun, 8 Sep 2019 18:32:39 +0000 (11:32 -0700)
ansible/templates/nginx.conf

index ac4c3526edbbd6f55e675a4ca07e1112415fb81e..ec25439a528995cfdc04d015294f9cd83a776417 100644 (file)
@@ -67,5 +67,10 @@ server {
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header Host $host;
       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;
+      }   
     }
 }