From fd3e9ba7603f896e475f54c9babed9b34f6929d4 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 24 Aug 2023 18:29:08 +1000 Subject: [PATCH] worker: Added auto https redirect --- worker/main.py | 4 ++-- worker/wp.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worker/main.py b/worker/main.py index 82e4a18..ea978d5 100644 --- a/worker/main.py +++ b/worker/main.py @@ -26,7 +26,7 @@ def new_site(): sites_file.close() # New site in background - thread = threading.Thread(target=new_site, args=(domain)) + thread = threading.Thread(target=new_site_script, args=(domain,)) thread.start() @@ -93,7 +93,7 @@ def site_exists(domain): else: return False -def new_site(domain): +def new_site_script(domain): script = 'bash wp.sh ' + domain os.system(script) diff --git a/worker/wp.sh b/worker/wp.sh index 227ddae..dc43ae3 100644 --- a/worker/wp.sh +++ b/worker/wp.sh @@ -73,7 +73,7 @@ printf "server { server_name $DOMAIN *.$DOMAIN; proxy_ssl_server_name on; location / { - proxy_set_header Accept-Encoding ""; + proxy_set_header Accept-Encoding \"\"; proxy_set_header X-Real-IP \$remote_addr; proxy_set_header Host \$http_host; proxy_set_header X-Forwarded-Host \$http_host; @@ -81,7 +81,7 @@ printf "server { proxy_set_header X-Forwarded-Proto \$scheme; proxy_pass $URL; - sub_filter '' ''; + sub_filter '' ''; sub_filter_once on; }