Skip to content

Commit

Permalink
Added allowed header "Authorization" to api cors
Browse files Browse the repository at this point in the history
  • Loading branch information
kikom committed Mar 20, 2017
1 parent f64107f commit c35fde9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func Start(cfg config.ApiConfig) {
corsConfig.AllowAllOrigins = true
corsConfig.AllowCredentials = true
corsConfig.AllowMethods = []string{"PUT", "POST", "DELETE", "GET", "OPTIONS"}
corsConfig.ExposeHeaders = []string{"Authorization"}
corsConfig.AllowHeaders = []string{"Origin", "Authorization"}

app.Use(cors.New(corsConfig))
log.Info("API CORS enabled")
Expand Down

0 comments on commit c35fde9

Please sign in to comment.