Comment 6 for bug 940439

Revision history for this message
Alvar Vilu (alvar-vilu) wrote : Re: dbfilter in configuration file is ignored

Not quite the same but if using proxy:

    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