From: Dessalines Date: Sun, 8 Sep 2019 18:32:39 +0000 (-0700) Subject: Adding image cache max. X-Git-Url: http://these/git/%7BprofileRss%7D?a=commitdiff_plain;h=bd40a784cfe74cb30ccfd26e434413d7f57af17f;p=lemmy.git Adding image cache max. --- diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index ac4c3526..ec25439a 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -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; + } } }