From 3bd90969a075b92560688903de017af5886371d5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 8 Jun 2020 15:20:40 +0100 Subject: [PATCH] nginx cache --- gemini/EN/install.gmi | 6 +++--- website/EN/index.html | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gemini/EN/install.gmi b/gemini/EN/install.gmi index 02c38e26..7013b3e3 100644 --- a/gemini/EN/install.gmi +++ b/gemini/EN/install.gmi @@ -128,16 +128,16 @@ 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 { + location ~ ^/(icons|images|media|emoji)/(.*)/(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) { expires 7d; proxy_pass http://localhost:7156; } - location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).png { + location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) { expires epoch; proxy_no_cache 1; proxy_pass http://localhost:7156; } - location ~ ^/icons/(like|repeat|calendar)(.*).png { + location ~ ^/icons/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) { expires epoch; proxy_no_cache 1; proxy_pass http://localhost:7156; diff --git a/website/EN/index.html b/website/EN/index.html index 4747038b..86a1bdec 100644 --- a/website/EN/index.html +++ b/website/EN/index.html @@ -1408,21 +1408,21 @@ 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 {
+ location ~ ^/(icons|images|media|emoji)/(.*)/(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires 7d;
proxy_pass http://localhost:7156;
}
- location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).png {
+ location ~ ^/icons/(.*)/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires epoch;
proxy_no_cache 1;
proxy_pass http://localhost:7156;
}
- location ~ ^/icons/(like|repeat|calendar)(.*).png {
+ location ~ ^/icons/(like|repeat|calendar)(.*).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires epoch;
proxy_no_cache 1;
proxy_pass http://localhost:7156;
}
- location ~ ^/users/(.*)/(image|banner).png {
+ location ~ ^/users/(.*)/(image|banner).(png|jpg|gif|webp|mp3|ogv|ogg|mp4) {
expires epoch;
proxy_no_cache 1;
proxy_pass http://localhost:7156;