mirror of
https://github.com/astaxie/beego.git
synced 2025-07-04 10:00:18 +00:00
add func InsertFilter(pattern string, pos int, filter FilterFunc) *App to replace AddFilter
pos can be const: BeforeRouter = iota AfterStatic BeforeExec AfterExec FinishRouter
This commit is contained in:
7
beego.go
7
beego.go
@ -49,6 +49,7 @@ func DelStaticPath(url string) *App {
|
||||
return BeeApp
|
||||
}
|
||||
|
||||
//!!DEPRECATED!! use InsertFilter
|
||||
//action has four values:
|
||||
//BeforRouter
|
||||
//AfterStatic
|
||||
@ -59,6 +60,12 @@ func AddFilter(pattern, action string, filter FilterFunc) *App {
|
||||
return BeeApp
|
||||
}
|
||||
|
||||
func InsertFilter(pattern string, pos int, filter FilterFunc) *App {
|
||||
BeeApp.InsertFilter(pattern, pos, filter)
|
||||
return BeeApp
|
||||
}
|
||||
|
||||
|
||||
func Run() {
|
||||
//if AppConfigPath not In the conf/app.conf reParse config
|
||||
if AppConfigPath != path.Join(AppPath, "conf", "app.conf") {
|
||||
|
Reference in New Issue
Block a user