[wp-trac] [WordPress Trac] #46107: Scripts: Assign api-fetch nonce with corrected rest_nonce
WordPress Trac
noreply at wordpress.org
Fri Jan 25 16:54:26 UTC 2019
#46107: Scripts: Assign api-fetch nonce with corrected rest_nonce
-----------------------------+-----------------------------
Reporter: aduth | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version:
Severity: normal | Keywords: has-patch
Focuses: |
-----------------------------+-----------------------------
Previously: #45113
Related: https://github.com/WordPress/gutenberg/pull/13451
The above package change for `@wordpress/api-fetch` will have the affect
both that `api-fetch` will not internally listen for `hearbeat.tick`
actions, but also that the nonce used for requests can be assignable on
the created middleware.
Thus, core could use this new mechanism to assign the nonce via an inline
script on heartbeat tick, using the corrected `rest_nonce` property on a
heartbeat response which had temporarily been patched in r43939 for the
sake of `api-fetch` compatibility.
The release schedule of `@wordpress/api-fetch` would be such that it's
expected this would need to be fixed in time for WordPress 5.2.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46107>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list