Browse Source

Merge pull request #423 from m0sth8/fix-xcsrf-token

Set headers in js and go files to X-Csrf-Token
tags/v1.2.0-rc1
无闻 10 years ago
parent
commit
f19fc230d4
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      cmd/web.go

+ 1
- 0
cmd/web.go View File

@@ -95,6 +95,7 @@ func newMacaron() *macaron.Macaron {
m.Use(csrf.Generate(csrf.Options{ m.Use(csrf.Generate(csrf.Options{
Secret: setting.SecretKey, Secret: setting.SecretKey,
SetCookie: true, SetCookie: true,
Header: "X-Csrf-Token",
})) }))
m.Use(toolbox.Toolboxer(m, toolbox.Options{ m.Use(toolbox.Toolboxer(m, toolbox.Options{
HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{ HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{


Loading…
Cancel
Save