Skip to content

Commit

Permalink
Merge pull request #35 from G-Core/feature/CDN-5952_add_request_limiter
Browse files Browse the repository at this point in the history
CDN-5952 added request_limiter option
  • Loading branch information
MarianaStrix authored Apr 18, 2023
2 parents 851ed2a + 0f6a052 commit 5b49bf3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gcore/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type Options struct {
Webp *Webp `json:"webp"`
Rewrite *Rewrite `json:"rewrite"`
RedirectHttpToHttps *RedirectHttpToHttps `json:"redirect_http_to_https"`
RequestLimiter *RequestLimiter `json:"request_limiter"`
GzipOn *GzipOn `json:"gzipOn"`
Cors *Cors `json:"cors"`
SNI *SNIOption `json:"sni"`
Expand Down Expand Up @@ -55,6 +56,14 @@ type RedirectHttpToHttps struct {
Value bool `json:"value"`
}

type RequestLimiter struct {
Enabled bool `json:"enabled"`
Rate int `json:"rate"`
Burst int `json:"burst"`
RateUnit string `json:"rate_unit"`
Delay int `json:"delay"`
}

type GzipOn struct {
Enabled bool `json:"enabled"`
Value bool `json:"value"`
Expand Down

0 comments on commit 5b49bf3

Please sign in to comment.