Merge pull request 'RVRNEXT-31 change logic of checking external assets' (#24) from bugfix/RVRNEXT-31-allow-special-characters-for-local-assets into master
All checks were successful
soko-web/pipeline/head This commit looks good

Reviewed-on: #24
This commit is contained in:
Bence Pőcze 2023-05-28 21:13:20 +02:00
commit 8d490e48aa
Signed by: Gitea
GPG Key ID: 7B89B83EED9AD2C6

View File

@ -139,7 +139,7 @@ class Linker
{ {
$output = []; $output = [];
if (preg_match('/^[\w\/\.]+$/', $asset) === 1) { if (preg_match('/^http(s)?/', $asset) !== 1) {
if ( if (
empty($_ENV['DEV']) && empty($_ENV['DEV']) &&
filesize(ROOT . '/public/static/' . $asset) < self::INLINE_ASSET_LIMIT filesize(ROOT . '/public/static/' . $asset) < self::INLINE_ASSET_LIMIT