[wp-trac] [WordPress Trac] #38521: REST API: Get rid of the `/users/me` redirect

WordPress Trac noreply at wordpress.org
Sun Oct 30 20:00:13 UTC 2016


#38521: REST API: Get rid of the `/users/me` redirect
--------------------------+--------------------------
 Reporter:  jnylen0       |       Owner:  rachelbaker
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.7
Component:  REST API      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+--------------------------

Comment (by jnylen0):

 For requests that require preflight (which is the case here because this
 endpoint only works when authenticated), the CORS spec explicitly
 prohibits redirects during both the preflight request and the actual
 request.

 https://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0

 > The following request rules are to be observed while making the
 preflight request:
 > [...]
 > '''If the response has an HTTP status code that is not in the 2xx
 range:'''
 > Apply the network error steps.

 > This is the actual request. Apply the make a request steps and observe
 the request rules below while making the request.
 > '''If the response has an HTTP status code of 301, 302, 303, 307, or
 308:'''
 > Apply the cache and network error steps.

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


More information about the wp-trac mailing list