Development

Changeset 1496

You must first sign up to be able to contribute.

Changeset 1496

Show
Ignore:
Timestamp:
06/21/06 11:19:10 (2 years ago)
Author:
fabien
Message:

fixed absolute URLs and Reverse Proxy (closes #637)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/request/sfWebRequest.class.php

    r1415 r1496  
    327327    $protocol  = $this->isSecure() ? 'https' : 'http'; 
    328328 
    329     return $protocol.'://'.$pathArray['HTTP_HOST'].$pathArray['REQUEST_URI']; 
     329    return $protocol.'://'.$this->getHost().$pathArray['REQUEST_URI']; 
    330330  } 
    331331 
     
    526526    $pathArray = $this->getPathInfoArray(); 
    527527 
    528     return isset($pathArray['HTTP_HOST']) ? $pathArray['HTTP_HOST'] : ''
     528    return isset($pathArray['HTTP_X_FORWARDED_HOST']) ? $pathArray['HTTP_X_FORWARDED_HOST'] : (isset($pathArray['HTTP_HOST']) ? $pathArray['HTTP_HOST'] : '')
    529529  } 
    530530