Skip to content

Commit

Permalink
Add OPTIONS Method To AllowMethods (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
180909 committed Aug 11, 2021
1 parent 9b78b37 commit 73a1e3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cors.go
Expand Up @@ -145,7 +145,7 @@ func (c Config) parseWildcardRules() [][]string {
// DefaultConfig returns a generic default configuration mapped to localhost.
func DefaultConfig() Config {
return Config{
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"},
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"},
AllowHeaders: []string{"Origin", "Content-Length", "Content-Type"},
AllowCredentials: false,
MaxAge: 12 * time.Hour,
Expand Down

0 comments on commit 73a1e3b

Please sign in to comment.