UNPKG

iframely

Version:

oEmbed/2 gateway endpoint. Get embed data for various http links through one self-hosted API

16 lines (11 loc) 417 B
export default { highestPriority: true, getMeta: function(url, meta) { var canonical = (meta.canonical && meta.canonical.href || meta.canonical) || (meta.og && meta.og.url) || (meta.twitter && meta.twitter.url); if (canonical && typeof canonical === 'string' && /^https?:\/\//i.test(canonical)) { return { canonical: canonical }; } } };