From b0a44d24d47460e09dc5754e46a816e68fed88a4 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 11 Mar 2023 15:28:13 +0800 Subject: [PATCH] Update config_api.py --- class/core/config_api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/class/core/config_api.py b/class/core/config_api.py index bcf1395e5..bed8c4079 100755 --- a/class/core/config_api.py +++ b/class/core/config_api.py @@ -417,11 +417,11 @@ class config_api: if conf.find('ssl_certificate') == -1: return mw.returnJson(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(panel_ssl, conf) else: