Skip to content

Commit 9d5d243

Browse files
committed
fix cors
1 parent dcfa150 commit 9d5d243

File tree

1 file changed

+1
-1
lines changed
  • templates/types/streaming/fastapi

1 file changed

+1
-1
lines changed

templates/types/streaming/fastapi/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
if environment == "dev":
3636
app.add_middleware(
3737
CORSMiddleware,
38-
allow_origins=["http://localhost:*", "http://0.0.0.0:*"],
38+
allow_origin_regex="http://localhost:\d+|http://0\.0\.0\.0:\d+",
3939
allow_credentials=True,
4040
allow_methods=["*"],
4141
allow_headers=["*"],

0 commit comments

Comments
 (0)