[RFC] [gatsby-source-drupal]: Add useAuthOn
option to specify which resources to use Auth on
#32039
Replies: 1 comment
-
I think for BC support it would be best to default to using the auth credentials for all requests unless the I'm also not sure if permissions could affect which fields show on the resource. Something like the "Field Permissions" module might not play too well with this. I think relationships could be affected. It would be good to hear @larowlan take on this. |
Beta Was this translation helpful? Give feedback.
-
Some Drupal resources can't be accessed unless you're authenticated. So it's common to add authentication to gatsby-source-drupal. But this has the unfortunate side-effect of slowing down access to public resources as now all API requests have to pass through the CDN to Drupal. The difference can be stark. @Auspicus tried disabling auth for his large (~70k entity) Drupal/Gatsby site and sourcing dropped 85% from ~200s to ~30s.
We could instead add a new option that lets you specify which resources need authentication. Then the source plugin could take advantage of CDN caching where possible and add authentication only when needed.
Beta Was this translation helpful? Give feedback.
All reactions