Ejemplo n.º 1
0
 /**
  * Add the port to the domain if necessary.
  *
  * @param  string  $domain
  * @return string
  */
 protected function addPortToDomain($domain)
 {
     if (in_array($this->request->getPort(), array('80', '443'))) {
         return $domain;
     }
     return $domain . ':' . $this->request->getPort();
 }
Ejemplo n.º 2
0
 /**
  * Add the port to the domain if necessary.
  *
  * @param  string  $domain
  * @return string
  */
 protected function addPortToDomain($domain)
 {
     $secure = $this->request->isSecure();
     $port = $this->request->getPort();
     if ($secure && $port === 443 || !$secure && $port === 80) {
         return $domain;
     }
     return $domain . ':' . $port;
 }
Ejemplo n.º 3
0
 /**
  * Returns the port on which the request is made.
  * 
  * This method can read the client port from the "X-Forwarded-Port" header
  * when trusted proxies were set via "setTrustedProxies()".
  * 
  * The "X-Forwarded-Port" header must contain the client port.
  * 
  * If your reverse proxy uses a different header name than "X-Forwarded-Port",
  * configure it via "setTrustedHeaderName()" with the "client-port" key.
  *
  * @return string 
  * @static 
  */
 public static function getPort()
 {
     //Method inherited from \Symfony\Component\HttpFoundation\Request
     return \Illuminate\Http\Request::getPort();
 }