Skip to content

Commit 44b27ea

Browse files
committed
gateway: disable Suborigins as it conflicts the spec
The Suborigins spec was changed and we have to adjust, the spec is still unstable and it might change in future. Currently the only browser supporting it (Chrome) errors out on it as it doesn't confront spec it uses. See ipfs/specs#131 License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
1 parent 548490f commit 44b27ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/corehttp/gateway_handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
207207
// which would turn into an incorrect Suborigin: example.net header.
208208
//
209209
// NOTE: This is not yet widely supported by browsers.
210-
if !ipnsHostname {
210+
// NOTE: Disable as currently supported format is broken: https://git.io/v1dNi
211+
if false && !ipnsHostname {
211212
pathRoot := strings.SplitN(urlPath, "/", 4)[2]
212213
w.Header().Set("Suborigin", pathRoot)
213214
}

0 commit comments

Comments
 (0)