changed session timeout to uint64 for supporting different architectures (arm)
This commit is contained in:
parent
a49ae9c6a8
commit
3f248092b0
@ -51,7 +51,7 @@ override the options.`,
|
|||||||
Port: mustGetString(flags, "port"),
|
Port: mustGetString(flags, "port"),
|
||||||
Log: mustGetString(flags, "log"),
|
Log: mustGetString(flags, "log"),
|
||||||
Session: settings.Session{
|
Session: settings.Session{
|
||||||
Timeout: mustGetUint(flags, "session.timeout"),
|
Timeout: uint64(mustGetUint(flags, "session.timeout")),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ you want to change. Other options will remain unchanged.`,
|
|||||||
case "auth.method":
|
case "auth.method":
|
||||||
hasAuth = true
|
hasAuth = true
|
||||||
case "session.timeout":
|
case "session.timeout":
|
||||||
ser.Session.Timeout = mustGetUint(flags, flag.Name)
|
ser.Session.Timeout = uint64(mustGetUint(flags, flag.Name))
|
||||||
case "shell":
|
case "shell":
|
||||||
set.Shell = convertCmdStrToCmdArray(mustGetString(flags, flag.Name))
|
set.Shell = convertCmdStrToCmdArray(mustGetString(flags, flag.Name))
|
||||||
case "branding.name":
|
case "branding.name":
|
||||||
|
|||||||
@ -185,7 +185,7 @@ func printToken(w http.ResponseWriter, _ *http.Request, d *data, user *users.Use
|
|||||||
},
|
},
|
||||||
StandardClaims: jwt.StandardClaims{
|
StandardClaims: jwt.StandardClaims{
|
||||||
IssuedAt: time.Now().Unix(),
|
IssuedAt: time.Now().Unix(),
|
||||||
ExpiresAt: time.Now().Add(time.Duration(d.server.Session.Timeout * uint(time.Hour))).Unix(),
|
ExpiresAt: time.Now().Add(time.Duration(d.server.Session.Timeout * uint64(time.Hour))).Unix(),
|
||||||
Issuer: "File Browser",
|
Issuer: "File Browser",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,5 +2,5 @@ package settings
|
|||||||
|
|
||||||
// Branding contains the branding settings of the app.
|
// Branding contains the branding settings of the app.
|
||||||
type Session struct {
|
type Session struct {
|
||||||
Timeout uint `json:"timeout"`
|
Timeout uint64 `json:"timeout"`
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user