mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
添加http服务拦截器
This commit is contained in:
@@ -60,6 +60,7 @@ type IHttpRouter interface {
|
||||
SetServeFile(method HTTP_METHOD, urlpath string, dirname string) error
|
||||
SetFormFileKey(formFileKey string)
|
||||
GetFormFileKey()string
|
||||
AddHttpFiltrate(FiltrateFun HttpFiltrate) bool
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +102,9 @@ type HttpService struct {
|
||||
processTimeout time.Duration
|
||||
}
|
||||
|
||||
|
||||
func (slf *HttpService) AddFiltrate(FiltrateFun HttpFiltrate) bool {
|
||||
return slf.httpRouter.AddHttpFiltrate(FiltrateFun)
|
||||
}
|
||||
|
||||
func NewHttpHttpRouter() IHttpRouter {
|
||||
httpRouter := &HttpRouter{}
|
||||
|
||||
Reference in New Issue
Block a user