Changes for #326

This commit is contained in:
the-djmaze 2022-04-19 09:40:29 +02:00
parent 3d0421762a
commit f39b1bb14d
4 changed files with 17 additions and 26 deletions

View file

@ -236,7 +236,7 @@ export const
setAttribute('data-x-src-cid', value.slice(4));
result.foundCIDs.push(value.slice(4));
}
else if (/^https?:\/\//i.test(value) || '//' === value.slice(0, 2))
else if (/^(https?:)?\/\//i.test(value))
{
setAttribute('data-x-src', useProxy ? proxy(value) : value);
result.hasExternals = true;

View file

@ -47,14 +47,7 @@ export const
serverRequestRaw('Download', download, customSpecSuffix),
proxy = url =>
SERVER_PREFIX + '/ProxyExternal/' + btoa(url).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''),
/*
return './?/ProxyExternal/'.Utils::EncodeKeyValuesQ(array(
'Rnd' => \md5(\microtime(true)),
'Token' => Utils::GetConnectionToken(),
'Url' => $sUrl
)).'/';
*/
SERVER_PREFIX + '/ProxyExternal/' + btoa(url.replace(/ /g, '%20')).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''),
/**
* @param {string} type