Added missing protocol and ports
This commit is contained in:
parent
b2e56954a0
commit
e4d27c24a4
|
@ -51,8 +51,11 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo
|
|||
$port = \parse_url($request->getOrigin($referrer), PHP_URL_PORT);
|
||||
|
||||
$refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.((\in_array($origin, $clients))
|
||||
? $origin : 'localhost') . (!empty($port) ? ':'.$port : '');
|
||||
$refDomain = (!$route->getLabel('origin', false)) ? $refDomain : $origin; // This route is publicly accessible
|
||||
? $origin : 'localhost').(!empty($port) ? ':'.$port : '');
|
||||
|
||||
$refDomain = (!$route->getLabel('origin', false)) // This route is publicly accessible
|
||||
? $refDomain
|
||||
: (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.$origin.(!empty($port) ? ':'.$port : '');
|
||||
|
||||
$selfDomain = new Domain($request->getHostname());
|
||||
$endDomain = new Domain((string)$origin);
|
||||
|
|
Loading…
Reference in a new issue