Merge pull request #612 from codedecay/dev

Add CherryPy Environment Option
This commit is contained in:
JonnyWong16 2016-03-25 12:59:28 -07:00
commit cc919415bb
3 changed files with 3 additions and 0 deletions

View file

@ -186,6 +186,7 @@ def main():
'http_port': http_port, 'http_port': http_port,
'http_host': plexpy.CONFIG.HTTP_HOST, 'http_host': plexpy.CONFIG.HTTP_HOST,
'http_root': plexpy.CONFIG.HTTP_ROOT, 'http_root': plexpy.CONFIG.HTTP_ROOT,
'http_environment': plexpy.CONFIG.HTTP_ENVIRONMENT,
'http_proxy': plexpy.CONFIG.HTTP_PROXY, 'http_proxy': plexpy.CONFIG.HTTP_PROXY,
'enable_https': plexpy.CONFIG.ENABLE_HTTPS, 'enable_https': plexpy.CONFIG.ENABLE_HTTPS,
'https_cert': plexpy.CONFIG.HTTPS_CERT, 'https_cert': plexpy.CONFIG.HTTPS_CERT,

View file

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

View file

@ -46,6 +46,7 @@ def initialize(options):
options_dict = { options_dict = {
'server.socket_port': options['http_port'], 'server.socket_port': options['http_port'],
'server.socket_host': options['http_host'], 'server.socket_host': options['http_host'],
'environment': options['http_environment'],
'server.thread_pool': 10, 'server.thread_pool': 10,
'tools.encode.on': True, 'tools.encode.on': True,
'tools.encode.encoding': 'utf-8', 'tools.encode.encoding': 'utf-8',