|
|
@@ -39,9 +39,9 @@ if (!function_exists('getPreview')) {
|
|
|
$host = request()->header('host');
|
|
|
$fileConfig = config('filesystem.disks');
|
|
|
$uploadPath = (isset($fileConfig['public']) && $fileConfig['public']['url'])? $fileConfig['public']['url']:'/uploads';
|
|
|
- $url = preg_match("/^(http):\/\//", trim($url,'//')) ? $url : '//'.$host . $uploadPath .'/' . ltrim($url, '/');
|
|
|
+ $url = preg_match("/^(https|http):\/\//", trim($url,'//')) ? $url : 'https://'.$host . $uploadPath .'/' . ltrim($url, '/');
|
|
|
}
|
|
|
- $url = $url? preg_replace("/^(http):\/\//", '//', $url) : '';
|
|
|
+ $url = $url? preg_replace("/^(https|http):\/\//", '//', $url) : '';
|
|
|
if(preg_match("/127.0|localhost/", $host) && $url){
|
|
|
$url = preg_replace("/^\/\//", 'http://', $url);
|
|
|
}
|