[wp-trac] [WordPress Trac] #46107: Scripts: Assign api-fetch nonce with corrected rest_nonce

WordPress Trac noreply at wordpress.org
Wed Mar 20 20:52:19 UTC 2019


#46107: Scripts: Assign api-fetch nonce with corrected rest_nonce
------------------------------+---------------------
 Reporter:  aduth             |       Owner:  aduth
     Type:  feature request   |      Status:  closed
 Priority:  high              |   Milestone:  5.2
Component:  Script Loader     |     Version:  5.1
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+---------------------
Changes (by aduth):

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


Comment:

 In [changeset:"44949" 44949]:
 {{{
 #!CommitTicketReference repository="" revision="44949"
 Scripts: Assign api-fetch nonce with corrected rest_nonce.

 As of `@wordpress/api-fetch at 3.0.0` (introduced in 44812), the `apiFetch`
 nonce middleware must have its nonce value assigned explicitly, and will
 no longer listen for heartbeat ticks automatically. This changeset adds an
 inline script for the default registration of the `api-fetch` script
 handle to assign the nonce value in response to the heartbeat action. In
 doing so, it removes the now-unused, misnamed `rest-nonce` property from
 the heartbeat response, whose original introduction served as temporary
 compatibility with earlier versions of `@wordpress/api-fetch`.

 See https://github.com/WordPress/gutenberg/pull/13451
 See #45113

 Props adamsilverstein, nerrad .
 Fixes #46107 .
 }}}

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


More information about the wp-trac mailing list