@@ -412,21 +412,24 @@ local function pattern(str) return { str, true } end
412412local function simple (str ) return { string .PatternSafe (str ), false } end
413413local registers = { [" pattern" ] = pattern , [" simple" ] = simple }
414414
415- -- Inspired / Taken from StarfallEx & Metastruct/gurl
416- -- No blacklist for now, just don't whitelist anything that has weird other routes.
417-
418- --- Note #1 (For PR Help)
419- -- Sites cannot track users / do any scummy shit with your data unless they're a massive corporation that you really can't avoid anyways.
420- -- So don't think about PRing your own website
421- -- Also these have to do with audio since this is an audio based addon.
422-
423- --- Note #2
424- -- Create a file called webaudio_whitelist.txt in your data folder to overwrite this, works on the server box or on your client.
425- -- Example file might look like this:
426- -- ```
427- -- pattern %w+%.sndcdn%.com
428- -- simple translate.google.com
429- -- ```
415+ --[[
416+ Inspired / Taken from StarfallEx & Metastruct/gurl
417+ No blacklist for now, just don't whitelist anything that has any possible redir routes.
418+
419+ ## Guidelines
420+ Sites cannot track users / do any scummy shit with your data unless they're a massive corporation that you really can't avoid anyways.
421+ So don't think about PRing your own website
422+ Also these have to do with audio since this is an audio based addon.
423+
424+ ## Custom whitelist
425+ Create a file called webaudio_whitelist.txt in your data folder to overwrite this, works on the server box or on your client.
426+ Example file might look like this:
427+ ```
428+ pattern %w+%.sndcdn%.com
429+ simple translate.google.com
430+ ```
431+ ]] --
432+
430433local Whitelist = {
431434 -- Soundcloud
432435 pattern [[ %w+%.sndcdn%.com/.+]] ,
@@ -471,7 +474,10 @@ local Whitelist = {
471474 simple [[ youtubedl.mattjeanes.com]] ,
472475
473476 -- MyInstants
474- simple [[ myinstants.com]]
477+ simple [[ myinstants.com]] ,
478+
479+ -- TTS like moonbase alpha's
480+ simple [[ tts.cyzon.us]]
475481}
476482
477483local OriginalWhitelist = table .Copy (Whitelist )
561567
562568local function isWhitelistedURL (url )
563569 if not isstring (url ) then return false end
570+ url = url :Trim ()
564571
565- local relative = url :match (" ^https?://(.*)" )
572+ local relative = url :match (" ^https?://www%.(.*) " ) or url : match ( " ^https?:// (.*)" )
566573 if not relative then return false end
567574
568575 if CLIENT and CustomWhitelist then
0 commit comments