From 283828e8f734193cc95820e6964fdfb8e9ff22aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Wed, 29 Mar 2023 10:01:25 +0200 Subject: [PATCH 1/2] Fix Now support WebDAV methods in the ALLOWED_METHODS setting's regex --- src/common/core/misc/plugin.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/core/misc/plugin.json b/src/common/core/misc/plugin.json index 6bf0b4731..ef10c894a 100644 --- a/src/common/core/misc/plugin.json +++ b/src/common/core/misc/plugin.json @@ -35,10 +35,10 @@ "ALLOWED_METHODS": { "context": "multisite", "default": "GET|POST|HEAD", - "help": "Allowed HTTP methods, separated with pipes to be sent by clients.", + "help": "Allowed HTTP and WebDAV methods, separated with pipes to be sent by clients.", "id": "allowed-methods", "label": "Allowed methods", - "regex": "^(?!\\|)(\\|?(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)(?!.*\\2))+$", + "regex": "^(?!\\|)(\\|?(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|COPY|LOCK|MKCOL|MOVE|PROPFIND|PROPPATCH|UNLOCK)(?!.*\\2))+$", "type": "text" }, "MAX_CLIENT_SIZE": { From 4f334a577aaab5b314613aefed5d59de9d63d4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Wed, 29 Mar 2023 10:18:48 +0200 Subject: [PATCH 2/2] Add sleep between BunkerNet registering and ping to the API to avoid being rate limited --- src/common/core/bunkernet/jobs/bunkernet-register.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/core/bunkernet/jobs/bunkernet-register.py b/src/common/core/bunkernet/jobs/bunkernet-register.py index 671dab264..4d5994591 100755 --- a/src/common/core/bunkernet/jobs/bunkernet-register.py +++ b/src/common/core/bunkernet/jobs/bunkernet-register.py @@ -98,6 +98,8 @@ try: bunkernet_id = Path("/var/cache/bunkerweb/bunkernet/instance.id").read_text() logger.info(f"Already registered on BunkerNet API with instance id {get_id()}") + sleep(1) + # Ping logger.info("Checking connectivity with BunkerNet API ...") bunkernet_ping = False