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
Hotfix/disk content type #155
Merged
Merged
Conversation
This file contains 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
…ntent-type to $storageDir/.gaia-metadata/$address/$path. This way, a Web server back-end will be able to reconstruct and return the correct Content-Type header on GET.
…use to report bogus content-type headers
kantai
reviewed
Nov 6, 2018
Pushed a simple error catch to the read endpoint. I was testing whether or not you can traverse with URLs like:
You cannot, but it caused the |
Anyways, thanks for the changes and the fix @jcnelson, please bump the version in |
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 patch updates the disk driver to store the
content-type
header contents alongside any files, written into the directory whose path is$storageRoot/.gaia-metadata/$address/$filename
. This is important, because these metadata files will not be directly listable or writeable by remote clients.This PR also adds a
reader/
sub-package that implements the read endpoint for thedisk
driver. This is a necessary component because the read endpoint is aware of the disk driver's above scheme, and will supply the appropriate content-type header onGET
.When deploying a Gaia hub that uses the
disk
driver, it is recommended to run both theblockstack-gaia-hub
process and theblockstack-gaia-reader
process, with theblockstack-gaia-reader
process running behind a "real" HTTP server like nginx. Theblockstack-gaia-reader
process can read the same config file as theblockstack-gaia-hub
, and will honor thediskSettings.storageRootDirectory
field to find the top-level disk storage directory.