def get_list(self, req):
proxy = req.session.proxy("db")
dbs = proxy.list()
h = req.httprequest.environ['HTTP_HOST'].split(':')[0]
d = h.split('.')[0]
r = req.config.dbfilter.replace('%h', h).replace('%d', d)
dbs = [i for i in dbs if re.match(r, i)]
return {"db_list": dbs}
then it will be HTTP_X_FORWARDED_HOST' that needs to be splitted and replaced against matches
Not quite the same but if using proxy:
def get_list(self, req): proxy(" db") .environ[ 'HTTP_HOST' ].split( ':')[0] dbfilter. replace( '%h', h).replace('%d', d)
proxy = req.session.
dbs = proxy.list()
h = req.httprequest
d = h.split('.')[0]
r = req.config.
dbs = [i for i in dbs if re.match(r, i)]
return {"db_list": dbs}
then it will be HTTP_X_ FORWARDED_ HOST' that needs to be splitted and replaced against matches