Update site.py

This commit is contained in:
dami 2026-04-03 01:19:43 +08:00
parent f94d23723c
commit 7af6dac964
1 changed files with 4 additions and 0 deletions

View File

@ -1929,6 +1929,8 @@ location ^~ {from} {\n\
conf = re.sub(rep, 'listen 80;', conf, 1)
rep = r"listen\s+443.+;"
conf = re.sub(rep, 'listen 443 ssl;', conf, 1)
rep = r"listen\s+[::]:443.+;"
conf = re.sub(rep, 'listen [::]:443 ssl;', conf, 1)
mw.writeFile(path, conf)
path = self.getHostConf(name)
@ -1938,6 +1940,8 @@ location ^~ {from} {\n\
conf = re.sub(rep, 'listen 80 default_server;', conf, 1)
rep = r"listen\s+443\s*ssl\s*\w*\s*;"
conf = re.sub(rep, 'listen 443 ssl default_server;', conf, 1)
rep = r"listen\s+[::]:443\s*ssl\s*\w*\s*;"
conf = re.sub(rep, 'listen [::]:443 ssl default_server;', conf, 1)
mw.writeFile(path, conf)
thisdb.setOption('default_site', name)