Development

#637: reverse-proxy.patch

You must first sign up to be able to contribute.

Ticket #637: reverse-proxy.patch

File reverse-proxy.patch, 0.5 kB (added by pookey, 3 years ago)
  • sfWebRequest.class.php

    old new  
    525525  { 
    526526    $pathArray = $this->getPathInfoArray(); 
    527527 
    528     return isset($pathArray['HTTP_HOST']) ? $pathArray['HTTP_HOST'] : ''; 
     528    if (isset($pathArray['HTTP_X_FORWARDED_HOST'])) { 
     529      return $pathArray['HTTP_X_FORWARDED_HOST']; 
     530    } elseif (isset($pathArray['HTTP_HOST'])) { 
     531      return $pathArray['HTTP_HOST']; 
     532    } else { 
     533      return ''; 
     534    } 
    529535  } 
    530536 
    531537  /**