aboutsummaryrefslogtreecommitdiffstats
path: root/webui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-02-19 10:02:05 +0000
committerGitHub <noreply@github.com>2023-02-19 10:02:05 +0000
commitc3d5a6ed37c164c626d938ead9c7f12dc1233804 (patch)
tree45ca92c95aa7f6e072710ae597dcecea5fd88d7b /webui.py
parent11183b4d905d14c6a0164a4d13675b89b1bf4ceb (diff)
parentdc25a31d1a3816a7fb0cd5ef186559b3c085db43 (diff)
downloadstable-diffusion-webui-gfx803-c3d5a6ed37c164c626d938ead9c7f12dc1233804.tar.gz
stable-diffusion-webui-gfx803-c3d5a6ed37c164c626d938ead9c7f12dc1233804.tar.bz2
stable-diffusion-webui-gfx803-c3d5a6ed37c164c626d938ead9c7f12dc1233804.zip
Merge pull request #7300 from Ju1-js/master
Gradio Auth - Read from External File
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/webui.py b/webui.py
index 39e5556a..69312a19 100644
--- a/webui.py
+++ b/webui.py
@@ -214,7 +214,7 @@ def webui():
ssl_keyfile=cmd_opts.tls_keyfile,
ssl_certfile=cmd_opts.tls_certfile,
debug=cmd_opts.gradio_debug,
- auth=[tuple(cred.split(':')) for cred in cmd_opts.gradio_auth.strip('"').split(',')] if cmd_opts.gradio_auth else None,
+ auth=[tuple(cred.split(':')) for cred in (cmd_opts.gradio_auth.strip('"').replace('\n','').split(',') + (open(cmd_opts.gradio_auth_path, 'r').read().strip().replace('\n','').split(',') if cmd_opts.gradio_auth_path and os.path.exists(cmd_opts.gradio_auth_path) else None))] if cmd_opts.gradio_auth or (cmd_opts.gradio_auth_path and os.path.exists(cmd_opts.gradio_auth_path)) else None,
inbrowser=cmd_opts.autolaunch,
prevent_thread_lock=True
)