mirror of
https://github.com/astaxie/beego.git
synced 2025-07-04 09:50:18 +00:00
add filter after
This commit is contained in:
30
beego.go
30
beego.go
@ -161,6 +161,21 @@ func (app *App) FilterPrefixPath(path string, filter http.HandlerFunc) *App {
|
||||
return app
|
||||
}
|
||||
|
||||
func (app *App) FilterAfter(filter http.HandlerFunc) *App {
|
||||
app.Handlers.FilterAfter(filter)
|
||||
return app
|
||||
}
|
||||
|
||||
func (app *App) FilterParamAfter(param string, filter http.HandlerFunc) *App {
|
||||
app.Handlers.FilterParamAfter(param, filter)
|
||||
return app
|
||||
}
|
||||
|
||||
func (app *App) FilterPrefixPathAfter(path string, filter http.HandlerFunc) *App {
|
||||
app.Handlers.FilterPrefixPathAfter(path, filter)
|
||||
return app
|
||||
}
|
||||
|
||||
func (app *App) SetViewsPath(path string) *App {
|
||||
ViewsPath = path
|
||||
return app
|
||||
@ -245,6 +260,21 @@ func FilterPrefixPath(path string, filter http.HandlerFunc) *App {
|
||||
return BeeApp
|
||||
}
|
||||
|
||||
func FilterAfter(filter http.HandlerFunc) *App {
|
||||
BeeApp.FilterAfter(filter)
|
||||
return BeeApp
|
||||
}
|
||||
|
||||
func FilterParamAfter(param string, filter http.HandlerFunc) *App {
|
||||
BeeApp.FilterParamAfter(param, filter)
|
||||
return BeeApp
|
||||
}
|
||||
|
||||
func FilterPrefixPathAfter(path string, filter http.HandlerFunc) *App {
|
||||
BeeApp.FilterPrefixPathAfter(path, filter)
|
||||
return BeeApp
|
||||
}
|
||||
|
||||
func Run() {
|
||||
if AppConfigPath != path.Join(AppPath, "conf", "app.conf") {
|
||||
err := ParseConfig()
|
||||
|
Reference in New Issue
Block a user