conf: overhaul security settings

This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-02-22 20:46:16 +08:00
parent a7e53b8134
commit 286fbc07e9
19 changed files with 151 additions and 126 deletions

View File

@@ -32,7 +32,7 @@ func Home(c *context.Context) {
}
// Check auto-login.
uname := c.GetCookie(conf.CookieUserName)
uname := c.GetCookie(conf.Security.CookieUsername)
if len(uname) != 0 {
c.Redirect(conf.Server.Subpath + "/user/login")
return