Ticket #2553: base_url.patch
| File base_url.patch, 0.6 KB (added by cmlenz, 3 years ago) |
|---|
-
trac/web/api.py
254 254 If the `path` parameter is specified, the path is appended to the URL. 255 255 Otherwise, only a URL with the components scheme, host and port is returned. 256 256 """ 257 if hasattr(req, 'base_url'): 258 scheme, host, _, _, _, _ = urlparse.urlparse(req.base_url) 259 return urlparse.urlunparse((scheme, host, path, None, None, None)) 260 257 261 host = req.get_header('Host') 258 262 if req.get_header('X-Forwarded-Host'): 259 263 host = req.get_header('X-Forwarded-Host')
