From 999f25c69a402c2707424d9f97b3c9c4d37a85ae Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 12 Feb 2024 15:40:34 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com> Co-authored-by: Marcin Rataj --- docs/environment-variables.md | 2 +- handlers.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index c4f1954..29f890b 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -54,7 +54,7 @@ disabled, and **response types requested via `?format=` and `Accept` HTTP header - [`application/vnd.ipfs.ipns-record`](https://www.iana.org/assignments/media-types/application/vnd.ipfs.ipns-record) **NOTE:** This setting is applied on top of everything else, to ensure -trustless domain can't be used for phishing or direct hotlinking and hosting of third-party content. +trustless domains can't be used for phishing or direct hotlinking and hosting of third-party content. Hostnames that are passed to both `RAINBOW_GATEWAY_DOMAINS` and `RAINBOW_TRUSTLESS_GATEWAY_DOMAINS` will work only as trustless gateways. Example: passing `trustless-gateway.link` will ensure only verifiable content types are supported when request comes with the `Host` header set to `trustless-gateway.link`. diff --git a/handlers.go b/handlers.go index 186fe27..bdced19 100644 --- a/handlers.go +++ b/handlers.go @@ -138,7 +138,7 @@ func setupGatewayHandler(cfg Config, nd *Node) (http.Handler, error) { for _, domain := range cfg.TrustlessGatewayDomains { publicGateways[domain] = &gateway.PublicGateway{ Paths: []string{"/ipfs", "/ipns", "/version"}, - NoDNSLink: noDNSLink, + NoDNSLink: true, InlineDNSLink: true, DeserializedResponses: false, UseSubdomains: contains(cfg.SubdomainGatewayDomains, domain),