Skip to content
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

Merged
merged 2 commits into from
Jan 5, 2019

Conversation

jackloughran
Copy link
Contributor

@jackloughran jackloughran commented Dec 10, 2018

@Stebalien this will show the hash if the request doesn't have ipfs in the url:
image
image

fixes #5724

@Stebalien
Copy link
Member

Is there an associated github.com/ipfs/dir-index-html PR?

@jackloughran
Copy link
Contributor Author

@Stebalien yes: ipfs/dir-index-html#21. sorry, ran out of time yesterday

@ghost ghost assigned Stebalien Dec 20, 2018
@ghost ghost added the status/in-progress In progress label Dec 20, 2018
@@ -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.

@Stebalien
Copy link
Member

(note: I've updated dir-index-html and rebased this)

@Stebalien Stebalien added the need/author-input Needs input from the original author label Jan 2, 2019
@Stebalien Stebalien force-pushed the feat/gateway/always-show-hash branch from 815b1c1 to de2b121 Compare January 4, 2019 01:02
@Stebalien
Copy link
Member

@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.

@Stebalien Stebalien added need/review Needs a review and removed need/author-input Needs input from the original author labels Jan 4, 2019
@magik6k magik6k self-requested a review January 4, 2019 01:31
@swedneck
Copy link
Contributor

swedneck commented Jan 4, 2019

I can't judge the code, but the screenshots look great.

@jackloughran
Copy link
Contributor Author

@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.

@magik6k magik6k removed the need/review Needs a review label Jan 4, 2019
jackloughran and others added 2 commits January 5, 2019 11:16
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 <[email protected]>
License: MIT
Signed-off-by: Steven Allen <[email protected]>
@Stebalien Stebalien force-pushed the feat/gateway/always-show-hash branch from de2b121 to 65fc4b4 Compare January 5, 2019 19:16
@Stebalien Stebalien merged commit f98652c into ipfs:master Jan 5, 2019
@ghost ghost removed the status/in-progress In progress label Jan 5, 2019
@Stebalien
Copy link
Member

Thanks @jackloughran for implementing this and @swedneck for the proposal!

hacdias pushed a commit to ipfs/boxo that referenced this pull request Jan 27, 2023
…ys-show-hash

Show hash on gateway

This commit was moved from ipfs/kubo@f98652c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gateways should always display "Index of /ipfs/HASH", instead of the URL.
4 participants