Community mailing list archives

Re: Proplem with dbfilter nginx ssl

Ygol InternetWork, Yves Goldberg
- 05/21/2016 05:27:38
yes. proxy_mode = True 
the headers in nginx are set as:
      proxy_set_header    Host            $host;
        proxy_set_header    X-Real-IP       $remote_addr;
        proxy_set_header    X-Forwarded-For $http_host;
      proxy_set_header    X-Forwarded-Proto https; 
Yves Goldberg - איב גולדברג
odooOfficial Partner - OCA member
Open Source ERP, CRM & CMS
T +972 (3) 720 8818
+972 (55) 966 1405
+32 (2) 588 2500
Raanana [ISRAEL]
LinkedIn  Skype  Github  Quora 
----- Original message -----
From: Nicolas Seinlet <>
To: Community <>
Subject: Re: Proplem with dbfilter nginx ssl
Date: Sat, 21 May 2016 09:22:55 -0000
have you enabled proxy_mode in odoo config, as well as forwarding correct headers in nginx?
Seinlet Nicolas <>
Technical Consultant 
Chaussée de Namur, 40 
1367 Grand-Rosière, Belgium
On Sat, May 21, 2016 at 8:27 AM, <> wrote:
Hi communiy,
running odoo 9e with dbfilter and nginx with ssl, I've faced a problem "session expired" and thus not being able to stay logged in the different databases. This is what's in the log:
Traceback (most recent call last):
  File "/odoo/odoo-server/openerp/", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/openerp/", line 1625, in _dispatch_nodb
    func, arguments = self.nodb_routing_map.bind_to_environ(request.httprequest.environ).match()
  File "/usr/lib/python2.7/dist-packages/werkzeug/", line 1433, in match
    raise NotFound()
NotFound: 404: Not Found
I followed:
and modified in which solve the problem.
def setup_db(self, httprequest):
    db = httprequest.session.db
    # Check if session.db is legit
    if db:
        if db not in db_filter([db], httprequest=httprequest):
            _logger.warn("Logged into database '%s', but dbfilter " "rejects it; logging session out.", db)
            # httprequest.session.logout() <----------- disable the session logout
            # db = None <----------- return db = db, i.e. do nothing by this function
            db = db
    if not db:
        httprequest.session.db = db_monodb(httprequest)
1. Do you know a way to fix the problem without modifying core code?
2. What would be the consequences of these modification to
thank you.
Yves Goldberg - איב גולדברג
odooOfficial Partner - OCA member
Open Source ERP, CRM & CMS
Raanana [ISRAEL]
LinkedIn  Skype  Github  Quora 

Post to:

Post to:

Email had 1 attachment:

  • image001.png
      4k (image/png)