photoprism/internal/server/limiter/auth.go
Michael Mayer d198a1d23f Security: Improve rate limit and HTTP proxy configuration #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-12 14:57:33 +02:00

13 lines
268 B
Go

package limiter
import (
"time"
"golang.org/x/time/rate"
)
const DefaultAuthLimit = 10
const DefaultAuthInterval = time.Minute
// Auth limits failed authentication requests (one per minute).
var Auth = NewLimit(rate.Every(DefaultAuthInterval), DefaultAuthLimit)