diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf index 83da2e88214..2fa141bc05e 100644 --- a/config/nginx.sample.conf +++ b/config/nginx.sample.conf @@ -21,8 +21,8 @@ server { location / { root /home/discourse/discourse/public; - ## optional image anti-hotlinking rules - #location ~ \.(jpe?g|png|gif)$ { + ## optional upload anti-hotlinking rules + #location ~ ^/uploads/ { # valid_referers none blocked mysite.com *.mysite.com; # if ($invalid_referer) { # return 403; @@ -35,7 +35,7 @@ server { add_header ETag ""; } - location ~ ^/assets/ { + location ~ ^/(assets|uploads)/ { expires 1y; add_header Cache-Control public; add_header ETag "";