Skip to content

Commit

Permalink
rename ProxyOption to P2PProxyOption
Browse files Browse the repository at this point in the history
(we're implementing an _actual_ proxy)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Mar 18, 2020
1 parent 97401b9 commit 11c229b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
}

if cfg.Experimental.P2pHttpProxy {
opts = append(opts, corehttp.ProxyOption())
opts = append(opts, corehttp.P2PProxyOption())
}

if len(cfg.Gateway.RootRedirect) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions core/corehttp/proxy.go → core/corehttp/p2p_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
p2phttp "github.com/libp2p/go-libp2p-http"
)

// ProxyOption is an endpoint for proxying a HTTP request to another ipfs peer
func ProxyOption() ServeOption {
// P2PProxyOption is an endpoint for proxying a HTTP request to another ipfs peer
func P2PProxyOption() ServeOption {
return func(ipfsNode *core.IpfsNode, _ net.Listener, mux *http.ServeMux) (*http.ServeMux, error) {
mux.HandleFunc("/p2p/", func(w http.ResponseWriter, request *http.Request) {
// parse request
Expand Down
File renamed without changes.

0 comments on commit 11c229b

Please sign in to comment.