aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-27 15:50:12 +0000
committerGitHub <noreply@github.com>2022-11-27 15:50:12 +0000
commit9e78d2c419732711e984c4478af15ece121d64fd (patch)
treeb5e4bce469b6b2f30a4093fb31613ae4958934fe /modules
parent9e8c4e2c7f445aba01f11a884b4e4231b1810909 (diff)
parent2f90496b19cd9c512633742db97b072a7075f017 (diff)
downloadstable-diffusion-webui-gfx803-9e78d2c419732711e984c4478af15ece121d64fd.tar.gz
stable-diffusion-webui-gfx803-9e78d2c419732711e984c4478af15ece121d64fd.tar.bz2
stable-diffusion-webui-gfx803-9e78d2c419732711e984c4478af15ece121d64fd.zip
Merge pull request #4416 from Keavon/cors-regex
Add CORS-allow policy launch argument using regex
Diffstat (limited to 'modules')
-rw-r--r--modules/shared.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/shared.py b/modules/shared.py
index 5067798c..c36ee211 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -81,13 +81,14 @@ parser.add_argument("--disable-console-progressbars", action='store_true', help=
parser.add_argument("--enable-console-prompts", action='store_true', help="print prompts to console when generating with txt2img and img2img", default=False)
parser.add_argument('--vae-path', type=str, help='Path to Variational Autoencoders model', default=None)
parser.add_argument("--disable-safe-unpickle", action='store_true', help="disable checking pytorch models for malicious code", default=False)
-parser.add_argument("--api", action='store_true', help="use api=True to launch the api with the webui")
-parser.add_argument("--api-auth", type=str, help='Set authentication for api like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"', default=None)
-parser.add_argument("--nowebui", action='store_true', help="use api=True to launch the api instead of the webui")
+parser.add_argument("--api", action='store_true', help="use api=True to launch the API together with the webui (use --nowebui instead for only the API)")
+parser.add_argument("--api-auth", type=str, help='Set authentication for API like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"', default=None)
+parser.add_argument("--nowebui", action='store_true', help="use api=True to launch the API instead of the webui")
parser.add_argument("--ui-debug-mode", action='store_true', help="Don't load model to quickly launch UI")
parser.add_argument("--device-id", type=str, help="Select the default CUDA device to use (export CUDA_VISIBLE_DEVICES=0,1,etc might be needed before)", default=None)
parser.add_argument("--administrator", action='store_true', help="Administrator rights", default=False)
-parser.add_argument("--cors-allow-origins", type=str, help="Allowed CORS origins", default=None)
+parser.add_argument("--cors-allow-origins", type=str, help="Allowed CORS origin(s) in the form of a comma-separated list (no spaces)", default=None)
+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("--server-name", type=str, help="Sets hostname of server", default=None)