Skip to content

Commit

Permalink
Adding proper abuse protection handler
Browse files Browse the repository at this point in the history
  • Loading branch information
I334869 committed Nov 29, 2021
1 parent 1170e89 commit a16fd21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/protocol/http/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func WithDefaultOptionsHandlerFunc(methods []string, rate int, origins []string,
if p == nil {
return fmt.Errorf("http OPTIONS handler func can not set nil protocol")
}
p.OptionsHandlerFn = p.DeleteHandlerFn
p.OptionsHandlerFn = p.OptionsHandler
p.WebhookConfig = &WebhookConfig{
AllowedMethods: methods,
AllowedRate: &rate,
Expand Down Expand Up @@ -286,4 +286,4 @@ func WithRateLimiter(rl RateLimiter) Option {
p.limiter = rl
return nil
}
}
}

0 comments on commit a16fd21

Please sign in to comment.