diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/model/config.go b/model/config.go index 525fc71ed..b7888ab13 100644 --- a/model/config.go +++ b/model/config.go @@ -802,7 +802,8 @@ type RateLimitSettings struct { PerSec *int MaxBurst *int MemoryStoreSize *int - VaryByRemoteAddr bool + VaryByRemoteAddr *bool + VaryByUser *bool VaryByHeader string } @@ -822,6 +823,14 @@ func (s *RateLimitSettings) SetDefaults() { if s.MemoryStoreSize == nil { s.MemoryStoreSize = NewInt(10000) } + + if s.VaryByRemoteAddr == nil { + s.VaryByRemoteAddr = NewBool(true) + } + + if s.VaryByUser == nil { + s.VaryByUser = NewBool(false) + } } type PrivacySettings struct { |