MCPcopy Create free account
hub / github.com/TruthHun/DocHub / Xsrf

Method Xsrf

controllers/AdminControllers/LoginController.go:118–121  ·  view source on GitHub ↗

防止跨站攻击,在有表单的控制器中调用

()

Source from the content-addressed store, hash-verified

116
117//防止跨站攻击,在有表单的控制器中调用
118func (this *LoginController) Xsrf() {
119 //使用的时候,直接在模板表单添加{{.xsrfdata}}
120 this.Data["xsrfdata"] = template.HTML(this.XSRFFormHTML())
121}

Callers 1

LoginMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected