|
@@ -61,6 +61,16 @@ parser.add_argument(
|
|
|
"externally. Defaults to 127.0.0.1 making the it only visible on localhost",
|
|
|
)
|
|
|
|
|
|
+parser.add_argument(
|
|
|
+ "--cert", "-s", default=None, help="Filename of SSL cert for the flask application."
|
|
|
+)
|
|
|
+parser.add_argument(
|
|
|
+ "--key",
|
|
|
+ "-k",
|
|
|
+ default=None,
|
|
|
+ help="Filename of the SSL key for the flask application.",
|
|
|
+)
|
|
|
+
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
if args.config:
|
|
@@ -97,4 +107,8 @@ if args.profile:
|
|
|
APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])
|
|
|
|
|
|
APP.debug = not args.no_debug
|
|
|
-APP.run(host=args.host, port=int(args.port))
|
|
|
+
|
|
|
+if args.cert and args.key:
|
|
|
+ APP.run(host=args.host, port=int(args.port), ssl_context=(args.cert, args.key))
|
|
|
+else:
|
|
|
+ APP.run(host=args.host, port=int(args.port))
|