forked from mirrors/pronouns.cc
fix(backend): add default limiter to rate limiter
This commit is contained in:
parent
c95285e26b
commit
b92ced7d1a
1 changed files with 3 additions and 2 deletions
|
@ -29,8 +29,9 @@ type scopedLimiter struct {
|
||||||
|
|
||||||
func NewLimiter(defaultLimit int, windowLength time.Duration, options ...httprate.Option) *Limiter {
|
func NewLimiter(defaultLimit int, windowLength time.Duration, options ...httprate.Option) *Limiter {
|
||||||
return &Limiter{
|
return &Limiter{
|
||||||
windowLength: windowLength,
|
windowLength: windowLength,
|
||||||
options: options,
|
options: options,
|
||||||
|
defaultLimiter: httprate.Limit(defaultLimit, windowLength, options...),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue