[gatsby-source-drupal] file download not working if using baseUrl of a proxy with path #36774
Closed
2 tasks done
Labels
topic: source-drupal
Related to Gatsby's integration with Drupal
topic: source-plugins
Relates to the Gatsby source plugins (e.g. -filesystem)
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
Situation: working Drupal 9 sites, latest stable gatsby-source-drupal. Gatsby slowing down Drupal during build. Need for an API Gateway.
Set up Amazon API Gateway, tested the connection, the proxy URL has format like
https://xyz.execute-api.eu-west-1.amazonaws.com/prod
There is no way to omit the "/prod" path in the API Gateway, as it signifies the environment.
Build works locally and on Gatsby Cloud as long as the Drupal site does not have any images/files.
When building using content from Drupal sites with images/files, the build fails (locally and on Gatsby Cloud) with error like
[gatsby-source-drupal] Encountered an unrecoverable error while generating Gatsby Image CDN fields for url https://xyz.execute-api.eu-west-1.amazonaws.com/sites/default/files/media-icons/generic/video.png. See above for additional information.
Note that the URL does NOT have "/prod" in there. That's the problem.
When I manually try with
https://xyz.execute-api.eu-west-1.amazonaws.com/prod/sites/default/files/media-icons/generic/video.png
then it does work.
So the problem is that
Reproduction Link
https://github.com/repo_is_not_public
Steps to Reproduce
Expected Result
File URLs like:
https://xyz.execute-api.eu-west-1.amazonaws.com/prod/sites/default/files/media-icons/generic/video.png
Actual Result
File URLs like:
https://xyz.execute-api.eu-west-1.amazonaws.com/sites/default/files/media-icons/generic/video.png
Environment
Config Flags
PRESERVE_FILE_DOWNLOAD_CACHE
FAST_DEV
PARALLEL_SOURCING
DEV_SSR
The text was updated successfully, but these errors were encountered: