From 5e5ebfb201bd503e8d2382fc11ad2a4c131647a4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 8 Jun 2020 15:07:25 +0100 Subject: [PATCH] More cache refinement --- gemini/EN/install.gmi | 9 ++++++--- website/EN/index.html | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gemini/EN/install.gmi b/gemini/EN/install.gmi index 118f5373..02c38e26 100644 --- a/gemini/EN/install.gmi +++ b/gemini/EN/install.gmi @@ -114,9 +114,8 @@ And paste the following: proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; proxy_set_header X-Forward-Proto http; proxy_set_header X-Nginx-Proxy true; - expires 7d; - proxy_set_header Pragma public; - proxy_set_header Cache-Control "public"; + expires epoch; + proxy_no_cache 1; proxy_temp_file_write_size 64k; proxy_connect_timeout 10080s; proxy_send_timeout 10080; @@ -129,6 +128,10 @@ And paste the following: proxy_buffering on; proxy_cache my_cache; proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; + location ~ ^/(icons|images|media|emoji)/(.*)/(.*).png { + expires 7d; + proxy_pass http://localhost:7156; + } location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).png { expires epoch; proxy_no_cache 1; diff --git a/website/EN/index.html b/website/EN/index.html index 0db017d5..4747038b 100644 --- a/website/EN/index.html +++ b/website/EN/index.html @@ -1394,9 +1394,8 @@ proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
- expires 7d;
- proxy_set_header Pragma public;
- proxy_set_header Cache-Control "public";
+ expires epoch;
+ proxy_no_cache 1;
proxy_temp_file_write_size 64k;
proxy_connect_timeout 10080s;
proxy_send_timeout 10080;
@@ -1409,6 +1408,10 @@ proxy_buffering on;
proxy_cache my_cache;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
+ location ~ ^/(icons|images|media|emoji)/(.*)/(.*).png {
+ expires 7d;
+ proxy_pass http://localhost:7156;
+ }
location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).png {
expires epoch;
proxy_no_cache 1;