Skip to content

Commit

Permalink
Merge pull request #27 from fy23-gw-gackathon/bugfix/add_auth_to_cors
Browse files Browse the repository at this point in the history
フロントエンドからのAuthヘッダーつきのAPIリクエストを送るとがCORSでコケる問題の修正
  • Loading branch information
gari8 committed May 10, 2023
2 parents ce0c631 + 5f81bda commit c85d5b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions infrastructure/middleware/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ func Cors(cfg config.Config) gin.HandlerFunc {
conf := cors.DefaultConfig()
conf.AllowOrigins = cfg.AllowOrigins
conf.AllowCredentials = true
conf.AllowHeaders = append(conf.AllowHeaders, "Authorization")
return cors.New(conf)
}

0 comments on commit c85d5b2

Please sign in to comment.