Automattic / Automattic/jetpack
Admin Page: Domain Mapping plugins lead to CORS errors
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
(I thought there was an issue for this already, but search-fu failed).
When the site_url and the home_url are different, commonly with domain mapping plugins, the new admin page will often fail due to CORS errors.
For example, the wp-admin may live at http://test.example.com/wp-admin/ but the home_url (and what Core's `rest_url()` uses) is http://example.net/ , so the React requests to the REST API URLs are blocked due to CORS.
Contributor guide
Research direction
Start by reproducing the admin page with different site_url and home_url values, then inspect the React requests to the REST API URLs generated through Core's rest_url(). Done means those requests no longer fail with CORS errors when domain mapping plugins separate the wp-admin host from the home_url host.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php, react
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100