comparison src/twisted/plugins/libervia_server.py @ 857:e17b15f1f260

server: added url_redirections_dict and url_redirections_profile in options
author Goffi <goffi@goffi.org>
date Sun, 24 Jan 2016 18:47:41 +0100
parents fd438e51bda8
children 20fbca3c949a
comparison
equal deleted inserted replaced
856:fd438e51bda8 857:e17b15f1f260
95 ['redirect_to_https', 'r', 1, _(u'Automatically redirect from HTTP to HTTPS.').encode('utf-8'), int], 95 ['redirect_to_https', 'r', 1, _(u'Automatically redirect from HTTP to HTTPS.').encode('utf-8'), int],
96 ['security_warning', 'w', 1, _(u'Warn user that he is about to connect on HTTP.').encode('utf-8'), int], 96 ['security_warning', 'w', 1, _(u'Warn user that he is about to connect on HTTP.').encode('utf-8'), int],
97 ['passphrase', 'k', '', (_(u"Passphrase for the SàT profile named '%s'") % C.SERVICE_PROFILE).encode('utf-8'), str], 97 ['passphrase', 'k', '', (_(u"Passphrase for the SàT profile named '%s'") % C.SERVICE_PROFILE).encode('utf-8'), str],
98 ['data_dir', 'd', DATA_DIR_DEFAULT, _(u'Data directory for Libervia').encode('utf-8'), coerceDataDir], 98 ['data_dir', 'd', DATA_DIR_DEFAULT, _(u'Data directory for Libervia').encode('utf-8'), coerceDataDir],
99 ] # options which are in sat.conf and on command line, see https://twistedmatrix.com/documents/current/api/twisted.python.usage.Options.html 99 ] # options which are in sat.conf and on command line, see https://twistedmatrix.com/documents/current/api/twisted.python.usage.Options.html
100 OPT_PARAMETERS_CFG = [['empty_password_allowed_warning_dangerous_list', None, '', None]] # Options which are in sat.conf only 100 # Options which are in sat.conf only
101 OPT_PARAMETERS_CFG = [
102 ['empty_password_allowed_warning_dangerous_list', None, '', None],
103 ['url_redirections_profile', None, '', None],
104 ['url_redirections_dict', None, {}, None],
105 ]
101 106
102 def initialise(options): 107 def initialise(options):
103 """Method to initialise global modules""" 108 """Method to initialise global modules"""
104 from twisted.internet import glib2reactor 109 from twisted.internet import glib2reactor
105 glib2reactor.install() 110 glib2reactor.install()