Add test embed domain to rule out cards

This commit is contained in:
Thomas Zarebczan 2021-10-12 20:55:33 -04:00
parent b49fed4cf5
commit 9dbee19961
No known key found for this signature in database
GPG key ID: D505010BDB4364BC

View file

@ -32,6 +32,11 @@ function getThumbnailCdnUrl(url) {
if (!THUMBNAIL_CARDS_CDN_URL || !url) {
return url;
}
if (url && url.includes('https://twitter-card')) {
return url;
}
if (url) {
const encodedURL = Buffer.from(url).toString('base64');
return `${THUMBNAIL_CARDS_CDN_URL}${encodedURL}.jpg`;