issue 380 and simplier token generation

This commit is contained in:
Andrea Spacca
2021-07-08 07:48:32 +02:00
parent d9198e78db
commit 69d979ca48
5 changed files with 26 additions and 41 deletions

View File

@ -187,7 +187,7 @@ func RateLimit(requests int) OptionFn {
}
}
func RandomTokenLength(length int64) OptionFn {
func RandomTokenLength(length int) OptionFn {
return func(srvr *Server) {
srvr.randomTokenLength = length
}
@ -288,7 +288,7 @@ type Server struct {
profilerEnabled bool
locks map[string]*sync.Mutex
locks sync.Map
maxUploadSize int64
rateLimitRequests int
@ -300,7 +300,7 @@ type Server struct {
forceHTTPs bool
randomTokenLength int64
randomTokenLength int
ipFilterOptions *IPFilterOptions
@ -329,7 +329,7 @@ type Server struct {
func New(options ...OptionFn) (*Server, error) {
s := &Server{
locks: map[string]*sync.Mutex{},
locks: sync.Map{},
}
for _, optionFn := range options {