Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: use "%d" in nginx with "dbfilter_from_header" module

by
Ygol InternetWork, Yves Goldberg
- 01/01/2021 09:07:43
Thanks Bruno. The second one is the one I am using and the 1st one is similar.
My question is more about if there is a syntax I could use.

Happy new year


----- Original message -----
From: Bruno Joliveau <bruno.joliveau@numigi.com>
Subject: Re: use "%d" in nginx with "dbfilter_from_header" module
Date: Thursday, December 31, 2020 18:37

I sent my mail too quickly ;-)




Bruno Joliveau - Architecte applications - Président
NUMIGI SOLUTIONS INC.
(514) 317-7944

Longueuil, Québec, Canada

linkedin
youtube
custom-icon
twitter











Le jeu. 31 déc. 2020 à 11:30, Bruno Joliveau <bruno.joliveau@numigi.com> a écrit :
Hi Yves,


Have a nice day!


Bruno Joliveau - Architecte applications - Président
NUMIGI SOLUTIONS INC.
(514) 317-7944

Longueuil, Québec, Canada

linkedin
youtube
custom-icon
twitter











Le jeu. 31 déc. 2020 à 05:02, Yves Goldberg <yves@ygol.com> a écrit :

hi all,

How may I pass the equivalent of "dbfilter = ^%d.*" (odoo conf file option) to a nginx proxy_set_header for dbfilter (using module dbfilter_from_header (odoo 13)?

I tried to use "<subdomain>" or $subdomain in my expression but It doesn't get substituted before being sent to odoo.
i.e. unsuccessfully tried:
proxy_set_header X-Odoo-dbfilter \b(?<subdomain>.*)\b\S+; 
proxy_set_header X-Odoo-dbfilter \b(?\<subdomain\>.*)\b\S+; 
proxy_set_header X-Odoo-dbfilter \b(?\$subdomain.*)\b\S+; 
proxy_set_header X-Odoo-dbfilter ^%d.*;


anyone can help?

the use case is that I would like to set this dbfilter for only some defined range of subdomains.

TIA 



 --
Yves Goldberg
odooOfficial Partner - OCA delegate
Open Source ERP, CRM & CMS
T +972 (3) 720 8818
+972 (55) 966 1405
+32 (2) 588 2500
 
 
--


_______________________________________________



_______________________________________________
Post to: mailto:contributors@odoo-community.org



Reference