rename ProxyOption to P2PProxyOption
(we're implementing an _actual_ proxy) License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Mar 14, 2019 at 16:07 UTC
11c229bb14726e2bdd99d706ded2383a4a41adb4
3 files changed
+3
-3
cmd/ipfs/daemon.go
+1
-1
@@ -644,7 +644,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
644
}
645
646
if cfg.Experimental.P2pHttpProxy {
647
- opts = append(opts, corehttp.ProxyOption())
647
+ opts = append(opts, corehttp.P2PProxyOption())
648
}
649
650
if len(cfg.Gateway.RootRedirect) > 0 {
core/corehttp/p2p_proxy.go
renamed
+2
-2
@@ -14,8 +14,8 @@ import (
14
p2phttp "github.com/libp2p/go-libp2p-http"
15
)
16
17
-// ProxyOption is an endpoint for proxying a HTTP request to another ipfs peer
18
-func ProxyOption() ServeOption {
17
+// P2PProxyOption is an endpoint for proxying a HTTP request to another ipfs peer
18
+func P2PProxyOption() ServeOption {
19
return func(ipfsNode *core.IpfsNode, _ net.Listener, mux *http.ServeMux) (*http.ServeMux, error) {
20
mux.HandleFunc("/p2p/", func(w http.ResponseWriter, request *http.Request) {
21
// parse request