Added random-token-length, Encode() refactored
This commit is contained in:
@ -274,6 +274,12 @@ var globalFlags = []cli.Flag{
|
||||
Value: "",
|
||||
EnvVar: "CORS_DOMAINS",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "random-token-length",
|
||||
Usage: "",
|
||||
Value: 6,
|
||||
EnvVar: "RANDOM_TOKEN_LENGTH",
|
||||
},
|
||||
}
|
||||
|
||||
type Cmd struct {
|
||||
@ -377,6 +383,9 @@ func New() *Cmd {
|
||||
options = append(options, server.RateLimit(v))
|
||||
}
|
||||
|
||||
v := c.Int64("random-token-length")
|
||||
options = append(options, server.RandomTokenLength(v))
|
||||
|
||||
purgeDays := c.Int("purge-days")
|
||||
purgeInterval := c.Int("purge-interval")
|
||||
if purgeDays > 0 && purgeInterval > 0 {
|
||||
|
Reference in New Issue
Block a user