id summary reporter owner description type status priority milestone component version severity resolution keywords cc mlocked 8317 MythWeb mangling URLs when more than one reverse proxy is used james@… Rob Smith "In 0.22, MythWeb was modified to write literal rather than relative URLs into the rendered pages. To handle conditions where the MythWeb instance is behind a reverse proxy, the following code is used to fill in the externally visible hostname based on the value passed in HTTP_X_FORWARDED_HOST: define('http_host', isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']); In the case where the MythWeb instance is behind more than reverse proxy, however, this method fails. The HTTP_X_FORWARDED_HOST will contain a comma-delimited list of all of the reverse proxies (i.e. ""proxy1.example.com, proxy2.example.com, proxy3.example.com""). This results in rather useless URLs in the rendered pages. This problem is easy to fix, however, as the first hostname is always the most external. By adding the following code right before that, this can be mitigated: if(isset($_SERVER['HTTP_X_FORWARDED_HOST'])) list($_SERVER['HTTP_X_FORWARDED_HOST']) = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST']); This simply throws away everything in HTTP_X_FORWARDED_HOST that appears after the first comma. I will admit that I'm probably the only person in the world that actually has this issue, due to the ridiculous nature of my network. And no, I don't have 3 proxies, only 2." defect closed trivial unknown Plugin - MythWeb head low fixed 0