Skip to content
Snippets Groups Projects
Commit 49051019 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed location redirects

parent 98a8aff5
No related branches found
No related tags found
No related merge requests found
......@@ -208,10 +208,10 @@ class ProxyController extends Controller
if (strtolower($index) === "location") {
$redLink = $value;
if (strpos($redLink, "/") === 0) {
$parse = parse_url($url);
$parse = parse_url($targetUrl);
$redLink = $parse["scheme"] . "://" . $parse["host"] . $redLink;
} elseif (preg_match("/^\w+\.\w+$/si", $redLink)) {
$parse = parse_url($url);
$parse = parse_url($targetUrl);
$redLink = $parse["scheme"] . "://" . $parse["host"] . "/" . $redLink;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment