[wp-trac] [WordPress Trac] #45074: Unable to use rest api if it has a query "?" in the url on Nginx. Gives "{"code":"rest_no_route", "message":"No route was found matching the URL and request method", "data":{"status":404}"

WordPress Trac noreply at wordpress.org
Sun Dec 9 20:48:38 UTC 2018


#45074: Unable to use rest api if it has a query "?" in the url on Nginx. Gives
"{"code":"rest_no_route","message":"No route was found matching the URL and
request method","data":{"status":404}"
--------------------------+------------------------------
 Reporter:  instanceid    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  4.9.8
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by strangerstudios):

 I have not been able to recreate this.

 I have a local environment using Local by Flywheel. It is running PHP
 7.2.9, WP 5.0, and Nginx (not sure the version).

 I activated Advanced Access Manager v5.7.1 and WP OAuth Server v3.6.0 but
 did not change any of the default settings for those.

 When I visit /wp-json/wp/v2/users?= or /wp-json/wp/v2/users?=j in a
 browser, I am returned the json for the one user on my site. When I visit
 those URLs while logged out, I get an empty set.

 Does this only happen when authenticating through OAuth? Are there
 settings for OAuth or AAM that are involved. Does this still happen in WP
 5.0?

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


More information about the wp-trac mailing list