1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Fixed missing protocol

This commit is contained in:
Eldad Fux 2020-07-21 08:48:31 +03:00
parent 0691057d55
commit 6f83c3b5e3

View file

@ -60,7 +60,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo
$protocol = \parse_url($request->getOrigin($referrer), PHP_URL_SCHEME);
$port = \parse_url($request->getOrigin($referrer), PHP_URL_PORT);
$refDomain = $protocol.'://'.((\in_array($origin, $clients))
$refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.((\in_array($origin, $clients))
? $origin : 'localhost') . (!empty($port) ? ':'.$port : '');
$selfDomain = new Domain($request->getHostname());