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

fix: add basic auth to image url before passing it to gatsbyImageData #35580

Closed
wants to merge 1 commit into from

Conversation

veryspry
Copy link
Contributor

@veryspry veryspry commented May 3, 2022

Summary

#35151 Points out that gatsby-source-wordpress builds now break when the WordPress instance is behind basic auth. This is because the new image resolver that the source plugin uses, gatsbyPluginImage does not pass along basic auth credentials when making requests for images from the WordPress instance.

⚠️ ⚠️ ⚠️ This is a WIP and isn't quite yet suitable to merge ⚠️ ⚠️ ⚠️

This is because the current fix adds the username/password to the image url in plain text before sending the request. Because gatsby does various things with those urls internally, such as logging them and in some cases persisting them more permanently (e.g. Gatsby Cloud build logs), we need to send these credentials via headers.

That latter part of sending the crendentials via headers is incoming, but I wanted to open a WIP PR for discussion etc.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 3, 2022
@veryspry
Copy link
Contributor Author

Closing since this was just a sort of POC to prove the cause of a bug

@veryspry veryspry closed this May 12, 2022
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 19, 2022
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.

None yet

2 participants