Versions in this module Expand all Collapse all v0 v0.4.11 Apr 17, 2023 v0.4.1 Apr 3, 2023 Changes in this version + func AddAccessControlHeaders(headers map[string][]string) + func NewHandler(c Config, api API) http.Handler + func ServeContent(w http.ResponseWriter, req *http.Request, name string, modtime time.Time, ...) (int, bool, error) + func WithHostname(next http.Handler, api API, publicGateways map[string]*Specification, ...) http.HandlerFunc + type API interface + GetBlock func(context.Context, cid.Cid) (blocks.Block, error) + GetDNSLinkRecord func(context.Context, string) (path.Path, error) + GetIPNSRecord func(context.Context, cid.Cid) ([]byte, error) + GetUnixFsNode func(context.Context, path.Resolved) (files.Node, error) + IsCached func(context.Context, path.Path) bool + LsUnixFsDir func(context.Context, path.Resolved) (<-chan iface.DirEntry, error) + ResolvePath func(context.Context, path.Path) (path.Resolved, error) + type Config struct + Headers map[string][]string + type RequestContextKey string + const DNSLinkHostnameKey + const GatewayHostnameKey + type Specification struct + InlineDNSLink bool + NoDNSLink bool + Paths []string + UseSubdomains bool