MAPG-196 fix regex that recognizes remote static root

This commit is contained in:
Bence Pőcze 2020-07-06 21:59:25 +02:00
parent a4c77c3d32
commit 2a7b5fb992
Signed by: bence
GPG Key ID: AA52B11A3269D1C1

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#198231">
<title><?= $_ENV['APP_NAME'] ?></title>
<?php if (preg_match('/^http(s)?/', $_ENV['STATIC_ROOT']) === 1): ?>
<?php if (preg_match('/^(http(s)?:)?\/\//', $_ENV['STATIC_ROOT']) === 1): ?>
<link href="<?= $_ENV['STATIC_ROOT'] ?>" rel="preconnect">
<?php endif; ?>
<link href="https://fonts.gstatic.com" rel="preconnect">