Skip to content

Commit

Permalink
(NOBIDS) frontend: do not ratelimit options
Browse files Browse the repository at this point in the history
  • Loading branch information
guybrush committed Aug 19, 2024
1 parent 5ded67e commit 3e65862
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 3e65862

Please sign in to comment.