-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show hash on gateway #5830
Show hash on gateway #5830
Conversation
Is there an associated github.com/ipfs/dir-index-html PR? |
@Stebalien yes: ipfs/dir-index-html#21. sorry, ran out of time yesterday |
51f4841
to
b19ca86
Compare
b19ca86
to
e660848
Compare
core/corehttp/gateway_handler.go
Outdated
@@ -347,11 +347,17 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr | |||
} | |||
} | |||
|
|||
var hash string | |||
if !strings.Contains(originalUrlPath, "ipfs") { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
(note: I've updated dir-index-html and rebased this) |
815b1c1
to
de2b121
Compare
@kevina, @magik6k, and/or @swedneck I'd like someone else to sign off on this as both @jackloughran and I participated a bit too much in the design to be neutral third parties. |
I can't judge the code, but the screenshots look great. |
@Stebalien thanks for making that change. i got sidetracked with the holidays. looks like this is good to go, but i'd be happy to do anything else over the weekend. |
Change the template handler to pass the hash to the directory listing template if the original url doesn't contain the hash. The directory listing template will display the hash in grey under the original url if the hash is passed to it. License: MIT Signed-off-by: Jack Loughran <j@ckloughran.com>
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
de2b121
to
65fc4b4
Compare
Thanks @jackloughran for implementing this and @swedneck for the proposal! |
…ys-show-hash Show hash on gateway This commit was moved from ipfs/kubo@f98652c
@Stebalien this will show the hash if the request doesn't have ipfs in the url:
fixes #5724