Hello Community, I am using odoo10 and I tried to used
dbfilter_from_header module and I set up like documentation of this
module.
I use the nginx in my server. I have multiple database and I want to
setup domain for each database with dbfilter. But after I setup
configuration for odoo.conf and nginx.conf, the url still points to database/selector page that mean my dbfilter is not working. Please someone point me out what's wrong with my configuration.
This is my nginx.conf.
# http -> https server { listen 80; server_name test.odoo.com; rewrite ^(.*) https://$host$1 permanent; } server { listen 443 ssl; server_name test.odoo.com; include /etc/nginx/sites-available/conf.d/*.conf; proxy_set_header X-Odoo-dbfilter dbname; ssl_certificate /etc/letsencrypt/live/test.odoo.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/test.odoo.com/privkey.pem; # Redirect requests to odoo backend server location / { proxy_redirect off; proxy_pass http://127.0.0.1:8069; } location /longpolling { proxy_pass http://127.0.0.1:8072; } location /web/database { auth_basic "Restricted Content"; auth_basic_user_file /etc/nginx/.htpasswd; proxy_pass http://127.0.0.1:8069; proxy_redirect off; } }
In my odoo.conf, I don't add dbfilter parameter and add proxy_mode = True,
server_wide_modules = web,web_kanban,dbfilter_from_header.
I also tried to check this function
server-tools/dbfilter_from_header/__init__.py
Line 14 in 660415a
def db_filter(dbs, httprequest=None): |
and I just noticed this function is not called when I run odoo server.