@cryptotaxi247 / kubo / commits / aa5daed3c

NoFetch gateway option

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

Łukasz Magiera committed Oct 26, 2018 at 02:28 UTC aa5daed3cb0fe9a98f6ab0bba1a50eddfc6cc572
1 file changed +2 -1
core/corehttp/gateway.go
+2 -1
@@ -2,6 +2,7 @@ package corehttp
2
3 import (
4 "fmt"
5 + "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
6 "net"
7 "net/http"
8
@@ -25,7 +26,7 @@ func GatewayOption(writable bool, paths ...string) ServeOption {
26 return nil, err
27 }
28
28 - api, err := coreapi.NewCoreAPI(n)
29 + api, err := coreapi.NewCoreAPI(n, options.Api.Offline(cfg.Gateway.NoFetch))
30 if err != nil {
31 return nil, err
32 }