mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
move the gateway-over-libp2p mountpoint to the root
This commit is contained in:
parent
5b0da08333
commit
9d32f71e22
@ -929,7 +929,13 @@ func serveTrustlessGatewayOverLibp2p(cctx *oldcmds.Context) (<-chan error, error
|
||||
StreamHost: node.PeerHost,
|
||||
}
|
||||
|
||||
h.SetHTTPHandler(gatewayProtocolID, handler)
|
||||
tmpProtocol := protocol.ID("/kubo/delete-me")
|
||||
h.SetHTTPHandler(tmpProtocol, http.NotFoundHandler())
|
||||
h.WellKnownHandler.RemoveProtocolMeta(tmpProtocol)
|
||||
|
||||
h.WellKnownHandler.AddProtocolMeta(gatewayProtocolID, p2phttp.ProtocolMeta{Path: "/"})
|
||||
h.ServeMux = http.NewServeMux()
|
||||
h.ServeMux.Handle("/", handler)
|
||||
|
||||
errc := make(chan error, 1)
|
||||
go func() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user