diff options
Diffstat (limited to 'cherrypy/_cpdispatch.py')
-rw-r--r-- | cherrypy/_cpdispatch.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cherrypy/_cpdispatch.py b/cherrypy/_cpdispatch.py index ac291e75..26754adb 100644 --- a/cherrypy/_cpdispatch.py +++ b/cherrypy/_cpdispatch.py @@ -527,15 +527,18 @@ def VirtualHost(next_dispatcher=Dispatcher(), use_x_forwarded_host=True, **domai 'www.domain2.example:443': '/secure', }) - ``next_dispatcher``: the next dispatcher object in the dispatch chain. + next_dispatcher + The next dispatcher object in the dispatch chain. The VirtualHost dispatcher adds a prefix to the URL and calls another dispatcher. Defaults to cherrypy.dispatch.Dispatcher(). - ``use_x_forwarded_host``: if True (the default), any "X-Forwarded-Host" + use_x_forwarded_host + If True (the default), any "X-Forwarded-Host" request header will be used instead of the "Host" header. This is commonly added by HTTP servers (such as Apache) when proxying. - ``**domains``: a dict mapping host header values to virtual prefixes. + ``**domains`` + A dict of {host header value: virtual prefix} pairs. The incoming "Host" request header is looked up in this dict, and, if a match is found, the corresponding "virtual prefix" value will be prepended to the URL path before calling the |