[wp-trac] [WordPress Trac] #47402: Problem with Access-Control-Allow-Origin, on IOS Ionic 4 app
WordPress Trac
noreply at wordpress.org
Mon May 27 11:33:30 UTC 2019
#47402: Problem with Access-Control-Allow-Origin, on IOS Ionic 4 app
--------------------------+-----------------------------
Reporter: pienoz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
[REQUEST_URI] => /wp-json/wp/v2/posts?per_page=20&_embed
[HTTP_ORIGIN] => ionic://localhost
In wp-includes/rest-api.php, function : rest_send_cors_headers()
$origin = 'ionic://localhost'
After **esc_url_raw**( $origin ),
$origin is null
Result : Access-Control-Allow-Origin:
instead : Access-Control-Allow-Origin: **ionic://localhost**
Error on IOS : origin is not allowed by access-control-allow-origin
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47402>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list