Skip to content

Commit

Permalink
(NOBIDS) frontend: do not ratelimit options (#2941)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybrush authored Aug 19, 2024
1 parent 5ded67e commit d280908
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ratelimit/ratelimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ func (r *responseWriterDelegator) Status() int {
}

var DefaultRequestFilter = func(req *http.Request) bool {
if req.Method == http.MethodOptions {
return false
}
if req.URL == nil || !strings.HasPrefix(req.URL.Path, "/api") || strings.HasPrefix(req.URL.Path, "/api/i/") || strings.HasPrefix(req.URL.Path, "/api/v1/docs/") || strings.HasPrefix(req.URL.Path, "/api/v2/docs/") {
return false
}
Expand Down

0 comments on commit d280908

Please sign in to comment.