Skip to content

Commit def30d1

Browse files
committed
CORS - whitelist all urls by default
1 parent 390dec2 commit def30d1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backends/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020

2121
# Configure CORS settings
2222
origins = [
23-
"http://localhost:3000",
24-
# "https://your-web-ui.com",
23+
"*", # to whitelist any url, REMOVE THIS FOR PRODUCTION!!!
24+
# "http://localhost:3000", # for dev
25+
# "https://your-web-ui.com", # for prod
2526
]
2627
app.add_middleware(
2728
CORSMiddleware,
28-
allow_origins=origins, # or use "*" to whitelist any url
29+
allow_origins=origins,
2930
# allow_credentials=True,
3031
allow_methods=["*"],
3132
allow_headers=["*"],

0 commit comments

Comments
 (0)