Fix starts_with to work with https

This commit is contained in:
Samuel Štancl 2019-10-04 21:50:11 +02:00
parent 2954c3e760
commit f7ce5bcdcb

View file

@ -41,9 +41,9 @@ return [
} }
}, },
'url' => function ($page, $path) { 'url' => function ($page, $path) {
return starts_with($path, 'http://') ? $path : '/'.trimPath($path); return (starts_with($path, 'http://') || starts_with($path, 'https://')) ? $path : '/'.trimPath($path);
}, },
'isUrl' => function ($page, $path) { 'isUrl' => function ($page, $path) {
return starts_with($path, 'http://'); return starts_with($path, 'http://') || starts_with($path, 'https://');
}, },
]; ];