1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-13 16:41:01 +00:00

adds ability to reset params after a filter runs

When a filter is run _after_ the router completes, it's input params,
such as `":splat"` will have been overwritten by the filter's router pass.
This commit adds the ability to tell the router to revert to the previous input
params after running a filter.
This commit is contained in:
dan pittman
2016-08-05 16:20:56 -07:00
parent 74778bb9d4
commit 0e786fa4af
4 changed files with 117 additions and 14 deletions

View File

@ -27,6 +27,7 @@ type FilterRouter struct {
tree *Tree
pattern string
returnOnOutput bool
resetParams bool
}
// ValidRouter checks if the current request is matched by this filter.