Skip to content

Commit

Permalink
swapping strings to http.Method* constants (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
syntaqx authored Oct 19, 2022
1 parent 83469f2 commit bbc62de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/flipt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ func run(ctx context.Context, logger *zap.Logger) error {
if cfg.Cors.Enabled {
cors := cors.New(cors.Options{
AllowedOrigins: cfg.Cors.AllowedOrigins,
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
AllowedMethods: []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodOptions},
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
ExposedHeaders: []string{"Link"},
AllowCredentials: true,
Expand Down

0 comments on commit bbc62de

Please sign in to comment.