[wp-trac] [WordPress Trac] #40450: Introduce REST API endpoint for proxying requests to external oEmbed providers
WordPress Trac
noreply at wordpress.org
Thu Apr 20 00:12:12 UTC 2017
#40450: Introduce REST API endpoint for proxying requests to external oEmbed
providers
----------------------------------------+-------------------------
Reporter: westonruter | Owner: swissspidy
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.8
Component: Embeds | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: rest-api
----------------------------------------+-------------------------
Comment (by westonruter):
@timmydcrawford The only reason for the `post_ID` for context is to that
the embed can be cached in a post's postmeta so that when the post gets
viewed on the ''frontend'' it won't cause the site to crash with external
requests. The capability check then I guess is to prevent some
unauthorized user from filling up postmeta on a given post with oEmbed
data.
To me it seems that for the purposes of the REST API endpoint, we can just
use transients instead, if we even really need caching here. The media
library JS can then be updated to just go ahead and use the embed proxy
endpoint and ignore whether it has a current post as context. Just like
this: https://github.com/xwp/wordpress-develop/pull/225/commits/2bb963d
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40450#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list