Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix: cors allow header x-api-key (options requests were blocking)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasfeijo committed Dec 26, 2023
1 parent 32de848 commit 7bfa409
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 @@ -151,6 +151,7 @@ func main() {
routes.SetupRoutes(router)
configCors := cors.DefaultConfig()
configCors.AllowOrigins = strings.Split(cfg.AllowOrigins, ",")
configCors.AllowHeaders = append(configCors.AllowHeaders, "X-API-Key")
router.Use(cors.New(configCors))

// Setup API routers
Expand Down

0 comments on commit 7bfa409

Please sign in to comment.