From 43186ad08407c08835f5678d10c7600e23b7fe8f Mon Sep 17 00:00:00 2001 From: Garrett Sutula Date: Thu, 27 Apr 2023 20:29:21 -0400 Subject: [PATCH] Add tls_verify arg for use with self-signed certs --- modules/cmd_args.py | 1 + webui.py | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 81c0b82a3..3aeecdcc8 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -95,6 +95,7 @@ parser.add_argument("--cors-allow-origins", type=str, help="Allowed CORS origin( parser.add_argument("--cors-allow-origins-regex", type=str, help="Allowed CORS origin(s) in the form of a single regular expression", default=None) parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requires --tls-certfile to fully function", default=None) parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None) +parser.add_argument("--tls-verify", type=bool, help="Enables the use of self-signed certificates when set to False", default=None) parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None) parser.add_argument("--gradio-queue", action='store_true', help="does not do anything", default=True) parser.add_argument("--no-gradio-queue", action='store_true', help="Disables gradio queue; causes the webpage to use http requests instead of websockets; was the defaul in earlier versions") diff --git a/webui.py b/webui.py index b570895fb..c86d3d499 100644 --- a/webui.py +++ b/webui.py @@ -260,6 +260,7 @@ def webui(): server_port=cmd_opts.port, ssl_keyfile=cmd_opts.tls_keyfile, ssl_certfile=cmd_opts.tls_certfile, + ssl_verify=cmd_opts.tls_verify, debug=cmd_opts.gradio_debug, auth=[tuple(cred.split(':')) for cred in gradio_auth_creds] if gradio_auth_creds else None, inbrowser=cmd_opts.autolaunch,