From 7fc4a7f89945902aff5887b85a19252323024598 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 17 Nov 2022 17:04:53 +0800 Subject: [PATCH] Update site_api.py --- class/core/site_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index ad1934601..508805392 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -940,12 +940,12 @@ class site_api: if conf: if conf.find('ssl_certificate') == -1: return mw.returnJson(False, '当前未开启SSL') - to = '\n#error_page 404/404.html;\n\ + to = "\n#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_END" conf = conf.replace('#error_page 404/404.html;', to) mw.writeFile(file, conf)