-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add typeform to whitelist, update name of said list (#586)
* feat: use 'allowlist' naming, add Typeform * Use less problematic naming for list * Rename files themselves, dingus
- Loading branch information
1 parent
6c564ff
commit c2fdf34
Showing
12 changed files
with
37 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
const whiteList = [ | ||
const allowList = [ | ||
'https://giftaid.comicrelief.com', | ||
'https://donation.comicrelief.com', | ||
'https://www.comicrelief.com', | ||
'https://www.sportrelief.com', | ||
'https://app.beapplied.com/org/comic-relief', | ||
'stories.comicrelief.com' | ||
'stories.comicrelief.com', | ||
'https://form.typeform.com' | ||
]; | ||
|
||
const whiteListed = url => { | ||
const allowListed = url => { | ||
if ( | ||
url !== undefined | ||
&& url !== null | ||
&& whiteList.some(v => url.indexOf(v) >= 0) | ||
&& allowList.some(v => url.indexOf(v) >= 0) | ||
) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
|
||
export default whiteListed; | ||
export default allowListed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import allowListed from './allowListed'; | ||
|
||
it('link is allowListed', () => { | ||
expect(allowListed('https://www.comicrelief.com/home')).toBe(true); | ||
}); | ||
|
||
it('link is not allowListed', () => { | ||
expect(allowListed('https://www.google.co.uk/')).toBe(false); | ||
}); |
This file was deleted.
Oops, something went wrong.