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:
@ -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...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user