This commit is contained in:
yumoqing 2024-01-27 17:22:56 +08:00
parent b1f3df862d
commit 69da784271

View File

@ -1,4 +1,5 @@
import os,sys import os,sys
from sys import platform
import time import time
import ssl import ssl
from socket import * from socket import *
@ -57,9 +58,12 @@ class ConfiguredServer(AppLogger):
ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
ssl_context.load_cert_chain(config.website.ssl.crtfile, ssl_context.load_cert_chain(config.website.ssl.crtfile,
config.website.ssl.keyfile) config.website.ssl.keyfile)
reuse_port = None
if platform != 'win32':
resue_port = True
web.run_app(self.init_auth(),host=config.website.host or '0.0.0.0', web.run_app(self.init_auth(),host=config.website.host or '0.0.0.0',
port=port, port=port,
reuse_port=reuse_port,
ssl_context=ssl_context) ssl_context=ssl_context)
def configPath(self,config): def configPath(self,config):