aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2024-01-09 16:33:31 +0000
committerGitHub <noreply@github.com>2024-01-09 16:33:31 +0000
commit639f22ea7c49da5236748790c34dc6ce0f1e3307 (patch)
treefa4ad334c1d70f0de9ef4fa5b90321b502fe212f /modules
parent905b14237fbc42f56ed20f0333ae5e1f06ce9bae (diff)
parent8d986727b39ee6616190559efa1c41c1942b99b0 (diff)
downloadstable-diffusion-webui-gfx803-639f22ea7c49da5236748790c34dc6ce0f1e3307.tar.gz
stable-diffusion-webui-gfx803-639f22ea7c49da5236748790c34dc6ce0f1e3307.tar.bz2
stable-diffusion-webui-gfx803-639f22ea7c49da5236748790c34dc6ce0f1e3307.zip
Merge pull request #14593 from papuSpartan/api_tls
Allow TLS with API only mode (--nowebui)
Diffstat (limited to 'modules')
-rw-r--r--modules/api/api.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/api/api.py b/modules/api/api.py
index 9d1292e9..59e46335 100644
--- a/modules/api/api.py
+++ b/modules/api/api.py
@@ -879,7 +879,15 @@ class Api:
def launch(self, server_name, port, root_path):
self.app.include_router(self.router)
- uvicorn.run(self.app, host=server_name, port=port, timeout_keep_alive=shared.cmd_opts.timeout_keep_alive, root_path=root_path)
+ uvicorn.run(
+ self.app,
+ host=server_name,
+ port=port,
+ timeout_keep_alive=shared.cmd_opts.timeout_keep_alive,
+ root_path=root_path,
+ ssl_keyfile=shared.cmd_opts.tls_keyfile,
+ ssl_certfile=shared.cmd_opts.tls_certfile
+ )
def kill_webui(self):
restart.stop_program()