Cross-Domain AJAX Request, Gatsby to Drupal8 #33066
Unanswered
Perumalposition2
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am new to Gatsby, I am trying to use Gatsby with Drupal8 CMS. Everything is working fine, For the contact form, I am using Webform in Drupal also installed the plugin gatsby-drupal-webform. I can able to fetch the fields from Drupal8 and display it in the contact us page created using Gatsby.
When I submit the form I am getting the error mentioned below. Because Gatsby and Drupal 8 are in different domains. Can anyone help me to solve this. Thanks in advance.
"Access to fetch at 'https://stage.gatsby********.***/webform_rest/submit?_format=json' from origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
-Perumal
Beta Was this translation helpful? Give feedback.
All reactions