Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(function (result) {
const resolve: Array> = []
// Attach OEmbed information to entry.
if (options.useOEmbed !== false) {
if (oembedJsonUrl) {
const req = get({
url: oembedJsonUrl,
headers: {
'User-Agent': options.userAgent
}
})
.use(status(200))
.use(plugins.parse('json'))
.then(
(res) => {
result.oembed = res.body
},
() => {/* Noop request/response errors. */}
)
resolve.push(req)
}
}
if (options.fallbackOnFavicon !== false) {
if (result.html && result.html.icons == null) {
const faviconUrl = resolveUrl(contentUrl, '/favicon.ico')
const req = get({