Skip to content

Commit

Permalink
feat: add AllowMethods and allow headers (#145)
Browse files Browse the repository at this point in the history
- 得写清楚,否则带 credentials 的请求会炸
  • Loading branch information
RaoHai authored Jun 10, 2024
2 parents 8618ffa + 7bf1bec commit f5fc4bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
CORSMiddleware,
allow_origins=cors_origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],
allow_headers=["Content-Type", "Authorization"],
)

app.include_router(health_checker.router)
Expand Down

0 comments on commit f5fc4bb

Please sign in to comment.