From 6f820fb201d8e572f5410cfc86e54ef8f7eefb4e Mon Sep 17 00:00:00 2001 From: videopi Date: Sun, 9 Oct 2022 18:11:03 +0200 Subject: [PATCH] Use TLS/SSL for server/client com --- app.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index ea2e052..b76a24d 100755 --- a/app.py +++ b/app.py @@ -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')