Skip to content

Commit

Permalink
Merge pull request #485 from roboflow/allow-cors-by-default
Browse files Browse the repository at this point in the history
Allow CORS by default
  • Loading branch information
PawelPeczek-Roboflow committed Jun 26, 2024
2 parents 657fa1c + e8205f6 commit aa0d92b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/quickstart/docker_configuration_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion inference/core/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa0d92b

Please sign in to comment.