From: Dessalines Date: Sun, 8 Sep 2019 18:32:39 +0000 (-0700) Subject: Adding image cache max. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/%22https:/hacktivis.me/%7Bthis.captchaPngSrc%28%29%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; + } } }