mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 23:01:28 +00:00
Merge pull request #2248 from smacker/RouterPattern-in-ctx
Add RouterPattern to context.Input
This commit is contained in:
commit
b635af5a8c
@ -712,10 +712,8 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
if routerInfo != nil {
|
||||
if BConfig.RunMode == DEV {
|
||||
//store router pattern into context
|
||||
context.Input.SetData("RouterPattern", routerInfo.pattern)
|
||||
}
|
||||
if routerInfo.routerType == routerTypeRESTFul {
|
||||
if _, ok := routerInfo.methods[r.Method]; ok {
|
||||
isRunnable = true
|
||||
|
Loading…
Reference in New Issue
Block a user