]> source.dussan.org Git - gitea.git/commitdiff
Set headers in js and go files to X-Csrf-Token
authorVyacheslav Bakhmutov <m0sth8@yandex-team.ru>
Tue, 2 Sep 2014 15:48:40 +0000 (22:48 +0700)
committerVyacheslav Bakhmutov <m0sth8@yandex-team.ru>
Tue, 2 Sep 2014 15:48:40 +0000 (22:48 +0700)
cmd/web.go

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