mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:00:55 +00:00
revert exceptMethod
This commit is contained in:
parent
983bac986a
commit
caf3714495
15
router.go
15
router.go
@ -63,14 +63,13 @@ var (
|
|||||||
"CONNECT": "CONNECT",
|
"CONNECT": "CONNECT",
|
||||||
}
|
}
|
||||||
// these beego.Controller's methods shouldn't reflect to AutoRouter
|
// these beego.Controller's methods shouldn't reflect to AutoRouter
|
||||||
exceptMethod = func() []string {
|
exceptMethod = []string{"Init", "Prepare", "Finish", "Render", "RenderString",
|
||||||
methods := []string{}
|
"RenderBytes", "Redirect", "Abort", "StopRun", "UrlFor", "ServeJson", "ServeJsonp",
|
||||||
rv := reflect.TypeOf(&Controller{})
|
"ServeXml", "Input", "ParseForm", "GetString", "GetStrings", "GetInt", "GetBool",
|
||||||
for i := 0; i < rv.NumMethod(); i++ {
|
"GetFloat", "GetFile", "SaveToFile", "StartSession", "SetSession", "GetSession",
|
||||||
methods = append(methods, rv.Method(i).Name)
|
"DelSession", "SessionRegenerateID", "DestroySession", "IsAjax", "GetSecureCookie",
|
||||||
}
|
"SetSecureCookie", "XsrfToken", "CheckXsrfCookie", "XsrfFormHtml",
|
||||||
return methods
|
"GetControllerAndAction"}
|
||||||
}()
|
|
||||||
|
|
||||||
urlPlaceholder = "{{placeholder}}"
|
urlPlaceholder = "{{placeholder}}"
|
||||||
// DefaultAccessLogFilter will skip the accesslog if return true
|
// DefaultAccessLogFilter will skip the accesslog if return true
|
||||||
|
Loading…
Reference in New Issue
Block a user