[wp-trac] [WordPress Trac] #43266: REST API JavaScript Client: Support an empty string for nonce

WordPress Trac noreply at wordpress.org
Sun Mar 18 17:20:49 UTC 2018


#43266: REST API JavaScript Client: Support an empty string for nonce
------------------------------+------------------------------
 Reporter:  ocean90           |       Owner:  adamsilverstein
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  4.9.5
Component:  REST API          |     Version:  4.9
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  javascript
------------------------------+------------------------------
Changes (by ocean90):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"42852"]:
 {{{
 #!CommitTicketReference repository="" revision="42852"
 REST API JavaScript Client: Support an empty string for `nonce` to disable
 sending the X-WP-Nonce header.

 Passing a `nonce` argument with an empty string to `wp.api.init()` now
 does no longer fall back to `wpApiSettings.nonce`. This makes it possible
 to stop sending nonce headers, for example to a read-only endpoint on
 another site in a multisite install.

 Props adamsilverstein, FPCSJames, ocean90, swissspidy.
 Fixes #42948, #43266.
 }}}

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


More information about the wp-trac mailing list