Update site.py

This commit is contained in:
dami 2026-04-03 01:34:08 +08:00
parent 341e2ed7ff
commit 4932eab08a
1 changed files with 8 additions and 0 deletions

View File

@ -1930,8 +1930,12 @@ 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\s+quic.+;"
conf = re.sub(rep, 'listen 443 quic;', conf, 1)
rep = r"listen\s+[::]:443.+;"
conf = re.sub(rep, 'listen [::]:443 ssl;', conf, 1)
rep = r"listen\s+[::]:443\s+quic.+;"
conf = re.sub(rep, 'listen [::]:443 quic;', conf, 1)
mw.writeFile(path, conf)
path = self.getHostConf(name)
@ -1941,8 +1945,12 @@ 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*quic\s*\w*\s*;"
conf = re.sub(rep, 'listen 443 quic 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*quic\s*\w*\s*;"
conf = re.sub(rep, 'listen [::]:443 quic default_server;', conf, 1)
mw.writeFile(path, conf)
thisdb.setOption('default_site', name)