🐛 Fixed referrals to web archive
no refs -removed ref param for archive.org domain -ref links to archive.org were broken
This commit is contained in:
parent
f6280d835d
commit
c111f8bef4
@ -4,7 +4,9 @@ const LinkReplacer = require('@tryghost/link-replacer');
|
||||
const blockedReferrerDomains = [
|
||||
// Facebook has some restrictions on the 'ref' attribute (max 15 chars + restricted character set) that breaks links if we add ?ref=longer-string
|
||||
'facebook.com',
|
||||
'www.facebook.com'
|
||||
'www.facebook.com',
|
||||
'web.archive.org',
|
||||
'archive.org'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -82,6 +82,11 @@ describe('OutboundLinkTagger', function () {
|
||||
const updatedUrl = await service.addToUrl(url);
|
||||
|
||||
should(updatedUrl.toString()).equal('https://facebook.com/');
|
||||
|
||||
const urlTwo = new URL('https://web.archive.org/');
|
||||
const updatedUrlTwo = await service.addToUrl(urlTwo);
|
||||
|
||||
should(updatedUrlTwo.toString()).equal('https://web.archive.org/');
|
||||
});
|
||||
|
||||
it('does not add ref if utm_source is present', async function () {
|
||||
|
Loading…
Reference in New Issue
Block a user