[wp-trac] [WordPress Trac] #48439: Wrong configuration parameter is taken as Rest Api root

WordPress Trac noreply at wordpress.org
Mon Apr 27 17:57:38 UTC 2020


#48439: Wrong configuration parameter is taken as Rest Api root
--------------------------+-----------------------
 Reporter:  dlavrenuek    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:  4.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  rest-api
--------------------------+-----------------------
Changes (by tbclark3):

 * status:  closed => reopened
 * resolution:  duplicate =>


Comment:

 I have discovered a different complication of the same issue.  I am
 running WordPress instances under Docker with reverse proxy provided by
 Apache.  The Docker instance is listening only on port 80; Apache is
 listening on 443.  If rest_url chooses https (which it does by default in
 my context) then editing works from the browser; however, all rest api
 requests from plugins fail because they are trying to get to https on the
 Docker instance, which doesn't exist.  Forcing rest_url to use http fixes
 the rest requests from plugins, but breaks the browser since browsers
 don't allow mixed content.  Setting the "Wordpress address" field to http
 and the "Site address" field should logically fix the problem, but it
 doesn't.  There should be a way to differentiate between rest_url requests
 that come internally from plugins (using http) vs those that are intended
 to be used from the browser (using https).

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


More information about the wp-trac mailing list