Use TLS/SSL for server/client com

This commit is contained in:
videopi 2022-10-09 18:11:03 +02:00
parent 5a5765603d
commit 6f820fb201
1 changed files with 7 additions and 2 deletions

9
app.py
View File

@ -5,6 +5,10 @@ from flask import Flask
# HTTP auth
from flask_httpauth import HTTPBasicAuth
from werkzeug.security import generate_password_hash, check_password_hash
#HTTPS
ASSETS_DIR = os.path.dirname(os.path.abspath(__file__))
# HTTP Serve
from waitress import serve
@ -73,5 +77,6 @@ def shutdown():
return "Shuting down..."
if __name__ == '__main__':
app.run()
#serve(app, host='0.0.0.0', port=8181)
# app.run()
# serve(app, host='0.0.0.0', port=5000)
serve(app, host='127.0.0.1', port=5000, url_scheme='https')