Simplify CORS code

This commit is contained in:
oobabooga 2023-11-16 20:11:55 -08:00
parent 13dc3b61da
commit e0a7cc5e0f

View File

@ -67,16 +67,8 @@ app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=["*"], allow_origins=["*"],
allow_credentials=True, allow_credentials=True,
allow_methods=["GET", "HEAD", "OPTIONS", "POST", "PUT"], allow_methods=["*"],
allow_headers=[ allow_headers=["*"]
"Origin",
"Accept",
"X-Requested-With",
"Content-Type",
"Access-Control-Request-Method",
"Access-Control-Request-Headers",
"Authorization",
],
) )