The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Rename the cors parameter to something more verbose.
comfyanonymousf84f2508cc45
diff --git a/comfy/cli_args.py b/comfy/cli_args.pyindex 5133e0ae5..f2960ae31 100644--- a/comfy/cli_args.py+++ b/comfy/cli_args.py@@ -4,7 +4,7 @@ parser = argparse.ArgumentParser()parser.add_argument("--listen", nargs="?", const="0.0.0.0", default="127.0.0.1", type=str, help="Specify the IP address to listen on (default: 127.0.0.1). If --listen is provided without an argument, it defaults to 0.0.0.0. (listens on all)")parser.add_argument("--port", type=int, default=8188, help="Set the listen port.")-parser.add_argument("--cors", default=None, nargs="?", const="*", help="Enable CORS (Cross-Origin Resource Sharing) with optional origin or allow all with default '*'.")+parser.add_argument("--enable-cors-header", default=None, nargs="?", const="*", help="Enable CORS (Cross-Origin Resource Sharing) with optional origin or allow all with default '*'.")parser.add_argument("--extra-model-paths-config", type=str, default=None, help="Load an extra_model_paths.yaml file.")parser.add_argument("--output-directory", type=str, default=None, help="Set the ComfyUI output directory.")parser.add_argument("--cuda-device", type=int, default=None, help="Set the id of the cuda device this instance will use.")diff --git a/server.py b/server.pyindex a9c0b4599..95cdeb051 100644--- a/server.py+++ b/server.py@@ -57,8 +57,8 @@ class PromptServer():self.number = 0middlewares = [cache_control]- if args.cors:- middlewares.append(create_cors_middleware(args.cors))+ if args.enable_cors_header:+ middlewares.append(create_cors_middleware(args.enable_cors_header))self.app = web.Application(client_max_size=20971520, middlewares=middlewares)self.sockets = dict()