diff --git a/frontend/services/common.ts b/frontend/services/common.ts index 4f8903a..873eb2d 100644 --- a/frontend/services/common.ts +++ b/frontend/services/common.ts @@ -195,7 +195,10 @@ export function generateEventText( // currently only Imgur/Streamable/YT links supported export function isValidEvidenceLink(link: string) { - return link.match(/youtu\.be|youtube\.com|streamable\.com|imgur\.com/) + return ( + link.match(/youtu\.be|youtube\.com|streamable\.com|imgur\.com/) || + isCdnUrl(link) + ) } export function isVideoUrl(url: string) { @@ -203,3 +206,7 @@ export function isVideoUrl(url: string) { /(\.(gif|mp4)$)|(youtu\.be|youtube\.com|streamable\.com|gfycat\.com)/ ) } + +export function isCdnUrl(url: string) { + return !!url.match(/^https:\/\/cdn.osrsrecords.com/) +}