refactor: new go-libipfs/gateway API, deprecate Gateway.Writable#9616
Merged
refactor: new go-libipfs/gateway API, deprecate Gateway.Writable#9616
Conversation
5eef1e8 to
d4152d6
Compare
d4152d6 to
ccd1e83
Compare
00e7f86 to
6e8f94d
Compare
6e8f94d to
330175a
Compare
lidel
requested changes
Feb 1, 2023
|
|
||
| i.addUserHeaders(w) // ok, _now_ write user's headers. | ||
| w.Header().Set("IPFS-Hash", p.Cid().String()) | ||
| log.Debugw("CID created, http redirect", "from", r.URL, "to", p, "status", http.StatusCreated) |
Check failure
Code scanning / CodeQL
Log entries created from user input
| w.Header().Set("IPFS-Hash", newcid.String()) | ||
|
|
||
| redirectURL := gopath.Join(ipfsPathPrefix, newcid.String(), newPath) | ||
| log.Debugw("CID replaced, redirect", "from", r.URL, "to", redirectURL, "status", http.StatusCreated) |
Check failure
Code scanning / CodeQL
Log entries created from user input
7e03f4c to
72cf86c
Compare
lidel
reviewed
Feb 2, 2023
497b038 to
f97dfb8
Compare
2 tasks
f97dfb8 to
82db057
Compare
82db057 to
3eb0053
Compare
lidel
approved these changes
Feb 2, 2023
Member
There was a problem hiding this comment.
Thank you, merged ipfs/boxo#145 rebased and added some deprecation docs pointing people at ipfs/specs#375 (if they care).
(security warnings above are triggered by Gateway.Writable code that was moved out and back, not a blocker)
3eb0053 to
2a8c524
Compare
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 updates the Gateway code to use the newer interface from
go-libipfs(ipfs/boxo#145)..Gateway.Writablechanged frombooltoFlaggo-libipfsgatewayApiinterface to match what is requested bygo-libipfsgo-libipfsonce feat(gateway): improve GO API interface, remove Writable API boxo#145 is merged.