From f6bee53b1a32013f8312f9c55d62aaa2d61d9e78 Mon Sep 17 00:00:00 2001 From: TNE Date: Sat, 30 Jul 2022 20:03:47 +0200 Subject: [PATCH] update nginx cache matching rules --- preset/conf.d-tunnels/chaotic.conf | 2 +- preset/conf.d/chaotic.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/preset/conf.d-tunnels/chaotic.conf b/preset/conf.d-tunnels/chaotic.conf index 4324f9c..a2416f3 100644 --- a/preset/conf.d-tunnels/chaotic.conf +++ b/preset/conf.d-tunnels/chaotic.conf @@ -5,7 +5,7 @@ server { autoindex_format xml; root /var/lib/nginx/html/http-root; - location ~* /chaotic-aur/x86_64/(?!.*chaotic-aur\.(db|files)).+\.tar.* { + location ~* ^/chaotic-aur/([^/]+)/x86_64/(?!\1\.(db|files))[^/]+$ { add_header Cache-Control "max-age=150, stale-while-revalidate=150, stale-if-error=86400"; } location / { diff --git a/preset/conf.d/chaotic.conf b/preset/conf.d/chaotic.conf index 201c239..0fcaa96 100644 --- a/preset/conf.d/chaotic.conf +++ b/preset/conf.d/chaotic.conf @@ -8,7 +8,7 @@ server { autoindex_format xml; root /var/lib/nginx/html/http-root; - location ~* /chaotic-aur/x86_64/(?!.*chaotic-aur\.(db|files)).+\.tar.* { + location ~* ^/chaotic-aur/([^/]+)/x86_64/(?!\1\.(db|files))[^/]+$ { add_header Cache-Control "max-age=150, stale-while-revalidate=150, stale-if-error=86400"; } location / {