From 1e2a3a45275cb3d39db997196f8610ca9d05754b Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 10 Aug 2021 15:20:46 +0200 Subject: [PATCH] ImageProxy: nginx: Adjust caching time to more reasonable values. Also enable SNI for proxy and remove client_max_body_size (not relevant here). --- xExtension-ImageProxy/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xExtension-ImageProxy/README.md b/xExtension-ImageProxy/README.md index ba579b0..9b04469 100644 --- a/xExtension-ImageProxy/README.md +++ b/xExtension-ImageProxy/README.md @@ -82,9 +82,9 @@ Add this to your nginx config: ``` nginx # Use 1 GiB cache with a 1 MiB memory zone (enough for ~8,000 keys). -# Delete data that has not been accessed for 30 minutes. +# Delete data that has not been accessed for 12 hours. proxy_cache_path /var/cache/nginx/freshrss levels=1:2 keys_zone=freshrss:1m - max_size=1G inactive=30m use_temp_path=off; + max_size=1g inactive=12h use_temp_path=off; server { @@ -96,10 +96,10 @@ server { } # Handle redirects coming from the target server. proxy_redirect ~^(.*)$ https://www.example.org/proxy?key=$arg_key&url=$1; - client_max_body_size 10M; + proxy_ssl_server_name on; proxy_cache freshrss; - # Cache positive answers for up to 1 hour. - proxy_cache_valid 200 301 302 307 308 1h; + # Cache positive answers for up to 2 days. + proxy_cache_valid 200 301 302 307 308 2d; } …