提交 0e440aed 作者: Steven Allen

rename ProxyOption to P2PProxyOption

(we're implementing an _actual_ proxy)

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 09c56efa
......@@ -595,7 +595,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 {
......
......@@ -14,8 +14,8 @@ import (
protocol "github.com/libp2p/go-libp2p-protocol"
)
// 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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论