CORS: allow all origins for production
Browse files- app/main.py +2 -2
app/main.py
CHANGED
|
@@ -26,10 +26,10 @@ app = FastAPI(
|
|
| 26 |
openapi_url="/openapi.json",
|
| 27 |
)
|
| 28 |
|
| 29 |
-
# CORS —
|
| 30 |
app.add_middleware(
|
| 31 |
CORSMiddleware,
|
| 32 |
-
allow_origins=
|
| 33 |
allow_credentials=False,
|
| 34 |
allow_methods=["GET", "POST", "OPTIONS"],
|
| 35 |
allow_headers=["*"],
|
|
|
|
| 26 |
openapi_url="/openapi.json",
|
| 27 |
)
|
| 28 |
|
| 29 |
+
# CORS — allow any origin so production, staging, and local all work
|
| 30 |
app.add_middleware(
|
| 31 |
CORSMiddleware,
|
| 32 |
+
allow_origins=["*"],
|
| 33 |
allow_credentials=False,
|
| 34 |
allow_methods=["GET", "POST", "OPTIONS"],
|
| 35 |
allow_headers=["*"],
|