Skip to content

Commit

Permalink
[FIX] dbs value has to be kept in case of special proxy config
Browse files Browse the repository at this point in the history
  • Loading branch information
cvinh committed Feb 5, 2024
1 parent 00a32d8 commit e39ed29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbfilter_from_header/override.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@


def db_filter(dbs, host=None):
dbs = db_filter_org(dbs, host)
dbs_orig = db_filter_org(dbs, host)
httprequest = http.request.httprequest
db_filter_hdr = httprequest.environ.get("HTTP_X_ODOO_DBFILTER")
if db_filter_hdr:
dbs = [db for db in dbs if re.match(db_filter_hdr, db)]
else:
dbs = dbs_orig
return dbs


Expand Down

0 comments on commit e39ed29

Please sign in to comment.