Contact Form 7 blocked by CORS. Multilingual site WPML + domain per language
-
Hello,
Form submissions with “Contact Forms 7” are bring block by CORS,
the site is running WPML and configured to serve 2 domains, one language per domain.When trying to submit a form from the original language (domain1.com), it works fine.
When trying to submit a form from a different language (domain2.com), the calls are being blocked by CORS:“Access to XMLHttpRequest at ‘https://www.domain1.com/wp-json/contact-form-7/v1/contact-forms/3025/feedback’ (redirected from ‘https://www.domain2.com/wp-json/contact-form-7/v1/contact-forms/3025/feedback’) from origin ‘https://www.domain2.com’ has been blocked by CORS policy: Request header field x-requested-with is not allowed by Access-Control-Allow-Headers in preflight response.”
The problem persists as long as W3TC is enabled.
Turning off any or all the caching modules did not help, disabling the plugin is the only solution.Excluding a page is also not viable solution, since we are using the forms in multiple pages.
Is there a way to configure the plugin to allow REST calls from CF7 ?
- The topic ‘Contact Form 7 blocked by CORS. Multilingual site WPML + domain per language’ is closed to new replies.