1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-09 12:10:19 +00:00

beego: XSRF support Controller level fix #610

default value is true when you Enable Global XSRF, also can control in
the prepare function to change the value.
This commit is contained in:
astaxie
2014-05-17 00:12:25 +08:00
parent e657dcfd5f
commit c5c806b58e
3 changed files with 14 additions and 4 deletions

View File

@ -186,16 +186,21 @@ func Htmlunquote(src string) string {
// UrlFor returns url string with another registered controller handler with params.
// usage:
//
// UrlFor(".index")
// print UrlFor("index")
// router /login
// print UrlFor("login")
// print UrlFor("login", "next","/"")
// print UrlFor("profile", "username","John Doe")
// router /profile/:username
// print UrlFor("profile", ":username","John Doe")
// result:
// /
// /login
// /login?next=/
// /user/John%20Doe
//
// more detail http://beego.me/docs/mvc/controller/urlbuilding.md
func UrlFor(endpoint string, values ...string) string {
return BeeApp.UrlFor(endpoint, values...)
}