Skip to content

Commit

Permalink
fix: support most HTTP methods for CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
crazybolillo committed Jul 25, 2024
1 parent 267d7f6 commit 316a154
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func serve(ctx context.Context) error {
r := chi.NewRouter()
r.Use(cors.Handler(cors.Options{
AllowedOrigins: strings.Split(os.Getenv("CORS_ALLOWED_ORIGINS"), ","),
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
}))
r.Use(middleware.AllowContentEncoding("application/json"))

Expand Down

0 comments on commit 316a154

Please sign in to comment.