d198a1d23f
Signed-off-by: Michael Mayer <michael@photoprism.app>
13 lines
268 B
Go
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)
|