[wp-trac] [WordPress Trac] #49146: Corrupted inner REST API requests.

WordPress Trac noreply at wordpress.org
Thu Apr 9 06:29:34 UTC 2020


#49146: Corrupted inner REST API requests.
--------------------------+-----------------------
 Reporter:  vavra7        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:  4.4
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  rest-api
--------------------------+-----------------------

Comment (by danielamof):

 Put this code at the end of functions.php, in your active theme. It works
 like a charm :) Thanks to [https://github.com/Kelderic Kelderic] for the
 solution:
 https://github.com/WordPress/gutenberg/issues/1761#issuecomment-549509676

 {{{
 add_filter('rest_url', function($url) {
     $url = str_replace(home_url(), site_url().'/index.php', $url);
     return $url;
 });
 }}}

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


More information about the wp-trac mailing list