fix(gateway): include CORS on subdomain redirects#9994
Merged
Conversation
6258061 to
b04e2f8
Compare
3 tasks
b04e2f8 to
fe9b641
Compare
hacdias
approved these changes
Jun 27, 2023
hacdias
pushed a commit
that referenced
this pull request
Jun 29, 2023
(cherry picked from commit 3da4e5b)
lidel
commented
Jun 30, 2023
Comment on lines
-70
to
-74
| HTTPHeaders: map[string][]string{ | ||
| "Access-Control-Allow-Origin": {"*"}, | ||
| "Access-Control-Allow-Methods": {"GET"}, | ||
| "Access-Control-Allow-Headers": {"X-Requested-With", "Range", "User-Agent"}, | ||
| }, |
Member
Author
There was a problem hiding this comment.
ℹ️ These are legacy values that were hardcoded since years ago, but no longer necessary. AddAccessControlHeaders from boxo/gateway ensures safe defaults are added if user did not pass own, and these values are already there, so we can remove them from config – they were not used/redundant for a while, even before we moved gateway code to boxo.
No need to write migration, as this is subset of what boxo/gateway sets anyway + we have tests in this PR that confirm these headers are will present even when missing from config.
This was referenced Jun 30, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR closes #9983 which is regression since 0.20.
We should include this fix in Kubo 0.21 (#9814).
Depends on ipfs/boxo#395