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

@@ -143,7 +143,7 @@ func newMacaron() *macaron.Macaron {
}))
m.Use(session.Sessioner(conf.SessionConfig))
m.Use(csrf.Csrfer(csrf.Options{
Secret: conf.SecretKey,
Secret: conf.Security.SecretKey,
Cookie: conf.CSRFCookieName,
SetCookie: true,
Header: "X-Csrf-Token",