[wp-trac] [WordPress Trac] #47402: Problem with Access-Control-Allow-Origin, on IOS Ionic 4 app

WordPress Trac noreply at wordpress.org
Tue May 28 06:43:04 UTC 2019


#47402: Problem with Access-Control-Allow-Origin, on IOS Ionic 4 app
--------------------------+-------------------------
 Reporter:  pienoz        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:  worksforme
 Keywords:                |     Focuses:
--------------------------+-------------------------
Changes (by ocean90):

 * status:  new => closed
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 Hello @pienoz, welcome to WordPress Trac!

 `ionic` is not part of the default list of supported protocols by
 [https://developer.wordpress.org/reference/functions/wp_allowed_protocols/
 wp_allowed_protocols()]. But you can easily extend the list with the help
 of the
 [https://developer.wordpress.org/reference/hooks/kses_allowed_protocols/
 kses_allowed_protocols] filter:

 {{{#!php
 <?php
 add_filter( 'kses_allowed_protocols', function( $protocols ) {
     $protocols[] = 'ionic';
     return $protocols;
 } );
 }}}

 With this snippet you can continue to use `ionic` in the Origin header.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47402#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list