Skip to content

Commit

Permalink
fix: remove body check for subdomain redirection (#65)
Browse files Browse the repository at this point in the history
context in ipfs/boxo#326
  • Loading branch information
hacdias authored Jun 1, 2023
1 parent e813393 commit 17cbde1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
require (
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
Expand Down
8 changes: 0 additions & 8 deletions tests/t0114_gateway_subdomains_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ func TestGatewaySubdomains(t *testing.T) {
Header("Location").
Hint("request for example.com/ipfs/{CIDv1} returns Location HTTP header for subdomain redirect in browsers").
Contains("{{scheme}}://{{cid}}.ipfs.{{host}}/", u.Scheme, CIDv1, u.Host),
).
BodyWithHint(`
We return body with HTTP 301 so existing cli scripts that use path-based
gateway do not break (curl doesn't auto-redirect without passing -L; wget
does not span across hostnames by default)
Context: https://github.com/ipfs/go-ipfs/issues/6975
`,
IsEqual("hello\n"),
),
))

Expand Down

0 comments on commit 17cbde1

Please sign in to comment.