mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 11:27:42 +08:00
17 lines
263 B
Go
17 lines
263 B
Go
package corehttp
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
core "github.com/jbenet/go-ipfs/core"
|
|
)
|
|
|
|
func GatewayOption(n *core.IpfsNode, mux *http.ServeMux) error {
|
|
gateway, err := newGatewayHandler(n)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
mux.Handle("/ipfs/", gateway)
|
|
return nil
|
|
}
|