Added random-token-length, Encode() refactored
This commit is contained in:
@ -187,6 +187,12 @@ func RateLimit(requests int) OptionFn {
|
||||
}
|
||||
}
|
||||
|
||||
func RandomTokenLength(length int64) OptionFn {
|
||||
return func(srvr *Server) {
|
||||
srvr.randomTokenLength = length
|
||||
}
|
||||
}
|
||||
|
||||
func Purge(days, interval int) OptionFn {
|
||||
return func(srvr *Server) {
|
||||
srvr.purgeDays = time.Duration(days) * time.Hour * 24
|
||||
@ -294,6 +300,8 @@ type Server struct {
|
||||
|
||||
forceHTTPs bool
|
||||
|
||||
randomTokenLength int64
|
||||
|
||||
ipFilterOptions *IPFilterOptions
|
||||
|
||||
VirusTotalKey string
|
||||
|
Reference in New Issue
Block a user