From 78f7570e169331d9102027a5a163391125e34c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Sun, 21 May 2023 12:50:16 -0400 Subject: [PATCH 1/2] core - Fix bwcli condition when checking bans --- tests/core/bwcli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/bwcli/main.py b/tests/core/bwcli/main.py index 368d21ead..87139958c 100644 --- a/tests/core/bwcli/main.py +++ b/tests/core/bwcli/main.py @@ -55,7 +55,7 @@ try: f'❌ Redis ban list not found in the output of "bans", exiting ...\noutput: {result.output.decode()}' ) exit(1) - elif b"1 hour" not in result.output or b"59 minutes" not in result.output: + elif b"1 hour" not in result.output and b"59 minutes" not in result.output: print( f"❌ Ban duration isn't 1 hour, exiting ...\noutput: {result.output.decode()}" ) From 737b999cdef1b88bd3f6bada0af11c329c20af72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Sun, 21 May 2023 13:04:55 -0400 Subject: [PATCH 2/2] Set CLIENT_CACHE_CONTROL setting's regex --- src/common/core/clientcache/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/core/clientcache/plugin.json b/src/common/core/clientcache/plugin.json index 36d2c254d..36ca0f6ff 100644 --- a/src/common/core/clientcache/plugin.json +++ b/src/common/core/clientcache/plugin.json @@ -38,7 +38,7 @@ "help": "Value of the Cache-Control HTTP header.", "id": "client-cache-control", "label": "Cache-Control header", - "regex": "^.*$", + "regex": "^(?!(, ?| ))((, )?(((max-age|s-maxage|stale-while-revalidate|stale-if-error)=\\d+(?!.*\\6))|((?!.*public)private|(?!.*private)public)|(must|proxy)-revalidate|must-understand|immutable|no-(cache|store|transform))(?!.*\\5))+$", "type": "text" } }