Dev qing #13
No files matched your search
+4
-1
@@ -582,6 +582,9 @@ if __name__ == '__main__':
|
|||||||
print("\n")
|
print("\n")
|
||||||
|
|
||||||
if SSL_ENABLED and os.path.exists(SSL_CERT_FILE) and os.path.exists(SSL_KEY_FILE):
|
if SSL_ENABLED and os.path.exists(SSL_CERT_FILE) and os.path.exists(SSL_KEY_FILE):
|
||||||
|
# Waitress 不支持 TLS,SSL 场景回退到 Flask 内置服务器
|
||||||
|
logger.warning("SSL enabled: falling back to Flask built-in server (Waitress has no TLS support)")
|
||||||
app.run(host=host, port=port, ssl_context=(SSL_CERT_FILE, SSL_KEY_FILE), debug=False)
|
app.run(host=host, port=port, ssl_context=(SSL_CERT_FILE, SSL_KEY_FILE), debug=False)
|
||||||
else:
|
else:
|
||||||
app.run(host=host, port=port, debug=False)
|
from waitress import serve
|
||||||
|
serve(app, host=host, port=port, threads=8)
|
||||||
@@ -2,3 +2,4 @@
|
|||||||
nuitka
|
nuitka
|
||||||
Flask>=2.3.0,<3.0.0
|
Flask>=2.3.0,<3.0.0
|
||||||
Flask-CORS>=4.0.0,<5.0.0
|
Flask-CORS>=4.0.0,<5.0.0
|
||||||
|
waitress>=2.1.2,<4.0.0
|
||||||
Reference in new issue
Block a user