[go: nahoru, domu]

Skip to content

Commit

Permalink
gateway: disable Suborigins as it conflicts the spec
Browse files Browse the repository at this point in the history
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 <kubuxu@protonmail.ch>
  • Loading branch information
Kubuxu committed Dec 19, 2016
1 parent 548490f commit 44b27ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
// which would turn into an incorrect Suborigin: example.net header.
//
// NOTE: This is not yet widely supported by browsers.
if !ipnsHostname {
// NOTE: Disable as currently supported format is broken: https://git.io/v1dNi
if false && !ipnsHostname {
pathRoot := strings.SplitN(urlPath, "/", 4)[2]
w.Header().Set("Suborigin", pathRoot)
}
Expand Down

0 comments on commit 44b27ea

Please sign in to comment.