Add cherrypy environmnet option

This commit is contained in:
Eric Solari 2016-03-15 16:12:27 -05:00
commit a59cb3b161
3 changed files with 3 additions and 0 deletions

View file

@ -179,6 +179,7 @@ def main():
# Try to start the server. Will exit here is address is already in use.
web_config = {
'http_port': http_port,
'http_environment': plexpy.CONFIG.HTTP_ENVIRONMENT,
'http_host': plexpy.CONFIG.HTTP_HOST,
'http_root': plexpy.CONFIG.HTTP_ROOT,
'http_proxy': plexpy.CONFIG.HTTP_PROXY,

View file

@ -142,6 +142,7 @@ _CONFIG_DEFINITIONS = {
'HTTPS_KEY': (str, 'General', ''),
'HTTPS_DOMAIN': (str, 'General', 'localhost'),
'HTTPS_IP': (str, 'General', '127.0.0.1'),
'HTTP_ENVIRONMENT': (str, 'General', 'production'),
'HTTP_HOST': (str, 'General', '0.0.0.0'),
'HTTP_PASSWORD': (str, 'General', ''),
'HTTP_PORT': (int, 'General', 8181),

View file

@ -44,6 +44,7 @@ def initialize(options):
enable_https = False
options_dict = {
'environment' :options['http_environment'],
'server.socket_port': options['http_port'],
'server.socket_host': options['http_host'],
'server.thread_pool': 10,