소스 검색

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

Vyacheslav Bakhmutov 10 년 전
부모
커밋
9476e58de9
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      cmd/web.go

+ 1 - 0
cmd/web.go

@@ -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{