mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:40:55 +00:00
Merge pull request #1157 from ziyel/master
Let filter function get more params info from ctx.Input.Params
This commit is contained in:
commit
4d70b22f96
@ -612,6 +612,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
if l, ok := p.filters[pos]; ok {
|
if l, ok := p.filters[pos]; ok {
|
||||||
for _, filterR := range l {
|
for _, filterR := range l {
|
||||||
if ok, p := filterR.ValidRouter(urlPath); ok {
|
if ok, p := filterR.ValidRouter(urlPath); ok {
|
||||||
|
for k, v := range context.Input.Params {
|
||||||
|
p[k] = v
|
||||||
|
}
|
||||||
context.Input.Params = p
|
context.Input.Params = p
|
||||||
filterR.filterFunc(context)
|
filterR.filterFunc(context)
|
||||||
if filterR.returnOnOutput && w.started {
|
if filterR.returnOnOutput && w.started {
|
||||||
|
Loading…
Reference in New Issue
Block a user