Make url_prefix a common option for all types of server

This commit is contained in:
Kovid Goyal 2015-06-03 20:37:11 +05:30
parent 02f992db01
commit f60a5367d1
2 changed files with 6 additions and 5 deletions

View File

@ -61,6 +61,10 @@ raw_options = (
'port', 8080,
None,
'A prefix to prepend to all URLs',
'url_prefix', None,
'Useful if you wish to run this server behind a reverse proxy.',
'The interface on which to listen for connections',
'listen_on', '0.0.0.0',
'The default is to listen on all available interfaces. You can change this to, for'

View File

@ -83,13 +83,10 @@ program will be used.
parser.add_option(
'--log', default=None,
help=_('Path to log file for server log'))
parser.add_option(
'--url-prefix', default=None,
help=_('A prefix to prepend to all URLs. Useful if you wish to run this server behind a reverse proxy.'))
parser.add_option('--daemonize', default=False, action='store_true',
help=_('Run process in background as a daemon. No effect on Windows.'))
help=_('Run process in background as a daemon. No effect on Windows.'))
parser.add_option('--pidfile', default=None,
help=_('Write process PID to the specified file'))
help=_('Write process PID to the specified file'))
return parser