From f60a5367d1c76e0edfa9deb110a0d9ef085e585e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 3 Jun 2015 20:37:11 +0530 Subject: [PATCH] Make url_prefix a common option for all types of server --- src/calibre/srv/opts.py | 4 ++++ src/calibre/srv/standalone.py | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/calibre/srv/opts.py b/src/calibre/srv/opts.py index aed8ee82f4..27329fa04f 100644 --- a/src/calibre/srv/opts.py +++ b/src/calibre/srv/opts.py @@ -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' diff --git a/src/calibre/srv/standalone.py b/src/calibre/srv/standalone.py index 734e3a6ec1..3d81451903 100644 --- a/src/calibre/srv/standalone.py +++ b/src/calibre/srv/standalone.py @@ -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