more compact respresentation
Brian Tiger Chow committed
Feb 4, 2015 at 18:48 UTC
4bc2713a2842d7b55c1bfc0de5642238cef1d65a
1 file changed
+3
-5
cmd/ipfs/daemon.go
+3
-5
@@ -203,16 +203,14 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
203
}
204
return false
205
})
206
- gatewayConfig := corehttp.GatewayConfig{
206
+ gateway := corehttp.NewGateway(corehttp.GatewayConfig{
207
Writable: true,
208
BlockList: blocklist,
209
- }
210
- gatewayOption := corehttp.NewGateway(gatewayConfig).ServeOption()
211
-
209
+ })
210
var opts = []corehttp.ServeOption{
211
corehttp.CommandsOption(*req.Context()),
212
corehttp.WebUIOption,
215
- gatewayOption,
213
+ gateway.ServeOption(),
214
}
215
if rootRedirect != nil {
216
opts = append(opts, rootRedirect)