提交 4bc2713a 作者: Brian Tiger Chow

more compact respresentation

上级 94c64c57
...@@ -203,16 +203,14 @@ func daemonFunc(req cmds.Request, res cmds.Response) { ...@@ -203,16 +203,14 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
} }
return false return false
}) })
gatewayConfig := corehttp.GatewayConfig{ gateway := corehttp.NewGateway(corehttp.GatewayConfig{
Writable: true, Writable: true,
BlockList: blocklist, BlockList: blocklist,
} })
gatewayOption := corehttp.NewGateway(gatewayConfig).ServeOption()
var opts = []corehttp.ServeOption{ var opts = []corehttp.ServeOption{
corehttp.CommandsOption(*req.Context()), corehttp.CommandsOption(*req.Context()),
corehttp.WebUIOption, corehttp.WebUIOption,
gatewayOption, gateway.ServeOption(),
} }
if rootRedirect != nil { if rootRedirect != nil {
opts = append(opts, rootRedirect) opts = append(opts, rootRedirect)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论