From ee09d27510af8c2e828b1f59bea0c6e589d00dc1 Mon Sep 17 00:00:00 2001 From: Brad Dwyer Date: Wed, 26 Jun 2024 10:57:23 -0700 Subject: [PATCH 1/2] Allow CORS by default --- inference/core/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inference/core/env.py b/inference/core/env.py index 4ccc249be..a5d0a9d54 100644 --- a/inference/core/env.py +++ b/inference/core/env.py @@ -16,7 +16,7 @@ ALLOW_NUMPY_INPUT = str2bool(os.getenv("ALLOW_NUMPY_INPUT", True)) # List of allowed origins -ALLOW_ORIGINS = os.getenv("ALLOW_ORIGINS", "") +ALLOW_ORIGINS = os.getenv("ALLOW_ORIGINS", "*") ALLOW_ORIGINS = ALLOW_ORIGINS.split(",") # Base URL for the API From e8205f6fd64f0ff6978afd9d94b000003838eb83 Mon Sep 17 00:00:00 2001 From: Brad Dwyer Date: Wed, 26 Jun 2024 11:00:35 -0700 Subject: [PATCH 2/2] Update docs --- docs/quickstart/docker_configuration_options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart/docker_configuration_options.md b/docs/quickstart/docker_configuration_options.md index df7c03b74..275ea1c8c 100644 --- a/docs/quickstart/docker_configuration_options.md +++ b/docs/quickstart/docker_configuration_options.md @@ -31,7 +31,7 @@ Sets the default non-maximal suppression (NMS) behavior for detection type model Variable: **ALLOW_ORIGINS** -Type: String (default = "") +Type: String (default = "*") Sets the allow_origins property on the CORSMiddleware used with FastAPI for HTTP interfaces. Multiple values can be provided separated by a comma (ex. ALLOW_ORIGINS=orig1.com,orig2.com).