Skip to content

Commit

Permalink
Added Authorization header in cors config 🛠
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-iaco committed Jan 14, 2023
1 parent 72dc6c1 commit f46cbb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func main() {
r := gin.Default()
corsConfig := cors.DefaultConfig()
corsConfig.AllowAllOrigins = true
corsConfig.AllowHeaders = append(corsConfig.AllowHeaders, "Authorization")
//corsConfig.AllowHeaders = append(corsConfig.AllowHeaders, "iv-user")
r.Use(cors.New(corsConfig))

Expand Down

0 comments on commit f46cbb1

Please sign in to comment.