10up/10up-experience

oEmbed Discovery Endpoints

rickalee opened this issue · 0 comments

Hi team,

This appears to be too strict and I believe we need to whitelist /wp-json/oembed/* for post embeds to work.

if ( 'all' === $restrict && ! user_can_access_rest_api() ) {

This snippet seems like a good opportunity to add filterable whitelist of paths as well.
https://snippets.khromov.se/disable-rest-api-for-anonymous-users/