-
Notifications
You must be signed in to change notification settings - Fork 10.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
feat(createRemoteFileNode): allow passing headers to request #11682
Conversation
@pieh can you review this? |
packages/gatsby-source-filesystem/src/create-remote-file-node.js
Outdated
Show resolved
Hide resolved
@pieh I think it needs review once again. |
@pieh can you review this? this is quiet simple. |
@iFlameing Unfortunately, you need to rebase this. It also seems that passing headers forward from |
packages/gatsby-source-filesystem/src/create-remote-file-node.js
Outdated
Show resolved
Hide resolved
@datakurre once I get a reply from @wardpeet I will rebase this pr and do the necessary changes as you said. |
@datakurre I rebased the pr and modified the changes as you suggested. Please take a look! |
@pieh, please! review this once again. |
I think this looks good, but I didn't actually tested as I don't have anything that require some specific headers to download files - so to merge I need some example to test against |
@pieh We already tested this for downloading private images from Plone Source. Here is the link of issue where we tested it collective/gatsby-source-plone#162. |
i'll test with a simple glitch site. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with https://judicious-dinghy.glitch.me/secret & https://github.com/gatsbyjs/gatsby/tree/master/examples/using-gatsby-image it works as expected. When the authorization header is not present I get a no access image and else I get authorized!
Holy buckets, @iFlameing — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Published in |
…s#11682) ## Description This allows a user to pass header to create-remote-file-node for fetching data which is in private mode in cms. thanks to @datakurre who also helped me in creating this pr.
…s#11682) ## Description This allows a user to pass header to create-remote-file-node for fetching data which is in private mode in cms. thanks to @datakurre who also helped me in creating this pr.
Description
This allows a user to pass header to create-remote-file-node for fetching data which is in private mode in cms.
thanks to @datakurre who also helped me in creating this pr.