TypeError: Failed to fetch
-
Hi,
On a Multisite installation with Domain Mapping, after switching the network domain and all sites to HTTPS, I’m now facing a problem with Jetpack. It’s no longer possible to enable/disable modules or even disconnect. I can force a site disconnect/reconnect from the Network admin but cannot reconnect again from any site admin itself.
Trying to connect directs me to a 404 page with an URL like https://network.dom/sitename/wp-admin/&from=landing-page-top
Console sais something interesting:
https://network.domain/sitename/wp-admin/admin.php?page=jetpack#/settings : Fetch API cannot load https://mapped.domain/wp-json/jetpack/v4/connection/url. Request header field x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response.
(notice the mapped domain is used for the API endpoint)
And after a forced reconnect from the Network admin, I cannot enable or disable modules. I get a “… failed to activate. TypeError: Failed to fetch” message and console warns about the Access-Control-Allow-Headers issue again.
Now my question is this: would adding a rule like
Header add Access-Control-Allow-Origin "*"
to the .htaccess solve this or would it open up all kinds of security issues?
Thanks for any tips ??
- The topic ‘TypeError: Failed to fetch’ is closed to new replies.