diff --git a/src/Presenters/ApiPresenter.php b/src/Presenters/ApiPresenter.php index 2909af2..69102fa 100644 --- a/src/Presenters/ApiPresenter.php +++ b/src/Presenters/ApiPresenter.php @@ -219,7 +219,11 @@ private function getRequestDomain() if (filter_input(INPUT_SERVER, 'HTTP_REFERER')) { $refererParsedUrl = parse_url(filter_input(INPUT_SERVER, 'HTTP_REFERER')); if (isset($refererParsedUrl['scheme']) && isset($refererParsedUrl['host'])) { - return $refererParsedUrl['scheme'] . '://' . $refererParsedUrl['host']; + $url = $refererParsedUrl['scheme'] . '://' . $refererParsedUrl['host']; + if (isset($refererParsedUrl['port']) && $refererParsedUrl['port'] !== 80) { + $url .= ':' . $refererParsedUrl['port']; + } + return $url; } } return false;