Spaces:
Running
Running
Add Northflank CORS origins for production deployment
Browse filesCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- server/app.py +5 -1
server/app.py
CHANGED
|
@@ -404,8 +404,12 @@ app.add_middleware(
|
|
| 404 |
allow_origins=[
|
| 405 |
"http://localhost:5173", # Vite dev server
|
| 406 |
"http://localhost:7860",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
],
|
| 408 |
-
allow_origin_regex=r"https://.*\.hf\.space",
|
| 409 |
allow_credentials=True,
|
| 410 |
allow_methods=["*"],
|
| 411 |
allow_headers=["*"],
|
|
|
|
| 404 |
allow_origins=[
|
| 405 |
"http://localhost:5173", # Vite dev server
|
| 406 |
"http://localhost:7860",
|
| 407 |
+
"http://localhost:3000",
|
| 408 |
+
"http://localhost:8000",
|
| 409 |
+
"https://web--jupyter-pytorch--9y6g97v7czb9.code.run",
|
| 410 |
+
"https://api--jupyter-pytorch--9y6g97v7czb9.code.run",
|
| 411 |
],
|
| 412 |
+
allow_origin_regex=r"https://.*\.hf\.space|https://.*\.code\.run",
|
| 413 |
allow_credentials=True,
|
| 414 |
allow_methods=["*"],
|
| 415 |
allow_headers=["*"],
|