You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Wordpress as a backend for an SPA developed in react. The client application lives in a different domain (ie. www.mydomain.com) from the Wordpress installation (ie. api.mydomain.com). To correctly display permalinks on the admin side, I have configured the Wordpress Address to point to the domain where WP is located, and the Site Address to the client.
I activated the Gutenberg plugin from the WP repository, and when editing a post, I get a blank edit view with a cross-domain error in the console, as it tries to access the WP Rest API using the Site Address (the client's domain). Is this expected behavior? I would assume that it should search for the API from the Wordpress Address?
Gutenberg uses rest_url and get_rest_url so a temporary workaround–not saying it's a final solution–is to filter the URL as mentioned in the other issue.
I am using Wordpress as a backend for an SPA developed in react. The client application lives in a different domain (ie. www.mydomain.com) from the Wordpress installation (ie. api.mydomain.com). To correctly display permalinks on the admin side, I have configured the Wordpress Address to point to the domain where WP is located, and the Site Address to the client.
I activated the Gutenberg plugin from the WP repository, and when editing a post, I get a blank edit view with a cross-domain error in the console, as it tries to access the WP Rest API using the Site Address (the client's domain). Is this expected behavior? I would assume that it should search for the API from the Wordpress Address?
Console error output:
Failed to load https://www.mydomain.com/wp-json/wp/v2/: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://api.mydomain.com' is therefore not allowed access.
Gutenberg plugin version: 3.5.0
Wordpress version: 4.9.8
The text was updated successfully, but these errors were encountered: