comparison src/server/server.py @ 881:6bdee34fa2f4

server: added base_url_ext option to handle different external URLs (e.g.: if there is a proxy)
author Goffi <goffi@goffi.org>
date Wed, 09 Mar 2016 18:38:52 +0100
parents d9b98b8a1847
children 763da94ba28b
comparison
equal deleted inserted replaced
880:ccbad50e1426 881:6bdee34fa2f4
1463 1463
1464 def __init__(self, options): 1464 def __init__(self, options):
1465 self.options = options 1465 self.options = options
1466 self.initialised = defer.Deferred() 1466 self.initialised = defer.Deferred()
1467 1467
1468 if self.options['base_url_ext']:
1469 self.base_url_ext = self.options.pop('base_url_ext')
1470 if self.base_url_ext[-1] != '/':
1471 self.base_url_ext += '/'
1472 else:
1473 self.base_url_ext = None
1468 if not self.options['port_https_ext']: 1474 if not self.options['port_https_ext']:
1469 self.options['port_https_ext'] = self.options['port_https'] 1475 self.options['port_https_ext'] = self.options['port_https']
1470 if self.options['data_dir'] == DATA_DIR_DEFAULT: 1476 if self.options['data_dir'] == DATA_DIR_DEFAULT:
1471 coerceDataDir(self.options['data_dir']) # this is not done when using the default value 1477 coerceDataDir(self.options['data_dir']) # this is not done when using the default value
1472 1478