From a3022c7f806dcfefe920c5c0d9d2ecd70fd3dfd0 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 10 Dec 2024 14:24:40 +0800 Subject: [PATCH] Update site.py --- web/utils/site.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/utils/site.py b/web/utils/site.py index 3be204b73..8b2b51dca 100644 --- a/web/utils/site.py +++ b/web/utils/site.py @@ -1138,11 +1138,11 @@ error_page 497 https://$host$request_uri;""" % (certPath, keyPath, http3Header) if conf.find('ssl_certificate') == -1: return mw.returnData(False, '当前未开启SSL') to = "#error_page 404/404.html;\n\ -#HTTP_TO_HTTPS_START\n\ -if ($server_port !~ 443){\n\ - rewrite ^(/.*)$ https://$host$1 permanent;\n\ -}\n\ -#HTTP_TO_HTTPS_END" + #HTTP_TO_HTTPS_START\n\ + if ($server_port !~ 443){\n\ + rewrite ^(/.*)$ https://$host$1 permanent;\n\ + }\n\ + #HTTP_TO_HTTPS_END" conf = conf.replace('#error_page 404/404.html;', to) mw.writeFile(file, conf)