示例#1
0
文件: xsrf.go 项目: webx-top/webx
func (c *Xsrf) Register(ctx echo.Context) {
	ctx.SetFunc("XsrfForm", func() template.HTML {
		return c.Form(ctx)
	})
	ctx.SetFunc("XsrfValue", func() string {
		return c.Value(ctx)
	})
	ctx.SetFunc("XsrfName", func() string {
		return c.FieldName
	})
}