mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 06:01:29 +00:00
Don't overwrite the params from function ValidRouter
just add new params to context.Input.Params
This commit is contained in:
parent
d9bb1a3592
commit
491238ce7d
@ -612,10 +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 {
|
for k, v := range p {
|
||||||
p[k] = v
|
context.Input.Params[k] = v
|
||||||
}
|
}
|
||||||
context.Input.Params = p
|
|
||||||
filterR.filterFunc(context)
|
filterR.filterFunc(context)
|
||||||
if filterR.returnOnOutput && w.started {
|
if filterR.returnOnOutput && w.started {
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user