Use TLS/SSL for server/client com
This commit is contained in:
parent
5a5765603d
commit
6f820fb201
9
app.py
9
app.py
|
@ -5,6 +5,10 @@ from flask import Flask
|
||||||
# HTTP auth
|
# HTTP auth
|
||||||
from flask_httpauth import HTTPBasicAuth
|
from flask_httpauth import HTTPBasicAuth
|
||||||
from werkzeug.security import generate_password_hash, check_password_hash
|
from werkzeug.security import generate_password_hash, check_password_hash
|
||||||
|
#HTTPS
|
||||||
|
|
||||||
|
ASSETS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
# HTTP Serve
|
# HTTP Serve
|
||||||
from waitress import serve
|
from waitress import serve
|
||||||
|
|
||||||
|
@ -73,5 +77,6 @@ def shutdown():
|
||||||
return "Shuting down..."
|
return "Shuting down..."
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run()
|
# app.run()
|
||||||
#serve(app, host='0.0.0.0', port=8181)
|
# serve(app, host='0.0.0.0', port=5000)
|
||||||
|
serve(app, host='127.0.0.1', port=5000, url_scheme='https')
|
||||||
|
|
Loading…
Reference in New Issue