Closed
Description
I have Apache listening port 8080 and Varnish listening port 80. It seems when I generate an absolute url with router, it adds port 8080 automatically. I'd like not to have any explicit ports in url even if I generate absolute urls
It seems to happen because of this code in Routing component's UrlGenerator.php
if (self::ABSOLUTE_URL === $referenceType || self::NETWORK_PATH === $referenceType) {
$port = '';
if ('http' === $scheme && 80 != $this->context->getHttpPort()) {
$port = ':'.$this->context->getHttpPort();
} elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) {
$port = ':'.$this->context->getHttpsPort();
}
$schemeAuthority = self::NETWORK_PATH === $referenceType ? '//' : "$scheme://";
$schemeAuthority .= $host.$port;
}
Is this a bug or a feature or am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels