0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-25 08:54:17 -05:00

Set headers in js and go files to X-Csrf-Token

This commit is contained in:
Vyacheslav Bakhmutov 2014-09-02 22:48:40 +07:00
parent 9ddd545473
commit 9476e58de9

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{