Community mailing list archives

community@mail.odoo.com

RE: Odoo server tool module dbfilter_from_header

by
Rooms For (Hong Kong) Limited, Yoshi Tashiro
- 07/23/2015 23:45:50

Hi Yassine,

 

We followed below steps before.  We used Apache but it should be similar with Nginx.

 

 

>>>

 

 

1. Install db_filter_from_header in one of the databases

 

2. Update the config file (odoo-server.conf)

Update ‘server _wide_modules’ to be like this:

server_wide_modules = web,web_kanban,dbfilter_from_header

3. Restart Odoo service

 

4. Update web Apache config file

Separate VirtualHost entries per sub-domain

 

---

NameVirtualHost *:443

<VirtualHost *:443>

       ServerName prod.example.com

       ProxyRequests Off

       ProxyPass / http://xxx.xxx.xxx.xxx:8069/

       ProxyPassReverse / http://xxx.xxx.xxx.xxx:8069/

       RequestHeader set "X-Forwarded-Proto" "https"

       Header add X-ODOO_DBFILTER "production"

       RequestHeader add X-ODOO_DBFILTER "production"

.

.

.

</VirtualHost>

<VirtualHost *:443>

       ServerName test.example.com

       ProxyRequests Off

       ProxyPass / http://xxx.xxx.xxx.xxx:8069/

       ProxyPassReverse / http://xxx.xxx.xxx.xxx:8069/

       RequestHeader set "X-Forwarded-Proto" "https"

       Header add X-ODOO_DBFILTER "test"

       RequestHeader add X-ODOO_DBFILTER "test"

.

.

.

</VirtualHost>

---

 

5. Restart Apache

 

 

Regards,

----------------------------
Yoshi Tashiro

 

From: Yassine Teimi [mailto:yteimi01@gmail.com]
Sent: Friday, July 24, 2015 12:39 AM
To: Community
Subject: Odoo server tool module dbfilter_from_header

 

Dears, 

 

Can you explain to me more about how to use this module ? It says that it allows

 you to pass a  dbfilter as a http header, but how ? 

 

Is it when I configure a routing of my domain name request to a specific database, using Nginx ? Or it's manually by typing on the url ? 

 

Please help. 

 

 

Many Thanks. 

-- 

 

Cordialement

 

Yassine TEIMI

 

Consultant & Odoo Project Manager

TEL : +212 6-27 33 30 78

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe