diff --git a/app/Http/Controllers/ProxyController.php b/app/Http/Controllers/ProxyController.php index 9207fdb099265a5aca1959743e595f729ab50440..ab4ebcad4ab3727f5f0fab36a71140c54694731d 100644 --- a/app/Http/Controllers/ProxyController.php +++ b/app/Http/Controllers/ProxyController.php @@ -325,7 +325,12 @@ class ProxyController extends Controller } elseif (!$withCookies && strtolower($ar[0]) === "content-type") { $headerArray[strtolower(trim($ar[0]))] = strtolower(trim($ar[1])); } elseif (strtolower($ar[0]) === "location") { - $headerArray[trim($ar[0])] = $this->proxifyUrl(trim($ar[1]), null, false); + $redLink = $ar[1]; + if(strpos($redLink, "/") === 0){ + $parse = parse_url($url); + $redLink = $parse["scheme"] . "://" . $parse["host"] . $redLink; + } + $headerArray[trim($ar[0])] = $this->proxifyUrl($redLink, null, false); } elseif (strtolower($ar[0]) === "content-disposition") { $headerArray[strtolower(trim($ar[0]))] = strtolower(trim($ar[1])); } else {