add router handler option
This commit is contained in:
@ -71,12 +71,12 @@ func buildService(cfg *config.Config) (services []*service.Service) {
|
||||
h := registry.GetHandler(svc.Handler.Type)(
|
||||
handler.BypassOption(bypasses[svc.Bypass]),
|
||||
handler.LoggerOption(handlerLogger),
|
||||
handler.RouterOption(&chain.Router{
|
||||
Chain: chains[svc.Chain],
|
||||
Logger: handlerLogger,
|
||||
}),
|
||||
)
|
||||
|
||||
if chainable, ok := h.(chain.Chainable); ok {
|
||||
chainable.WithChain(chains[svc.Chain])
|
||||
}
|
||||
|
||||
if forwarder, ok := h.(handler.Forwarder); ok {
|
||||
forwarder.Forward(forwarderFromConfig(svc.Forwarder))
|
||||
}
|
||||
|
Reference in New Issue
Block a user