Skip to content

[17.0][FIX] dbs value has to be kept in case of special proxy config - #3261

Open
cvinh wants to merge 1 commit into
OCA:17.0from
invitu:17.0-fix-dbfilter_from_header
Open

[17.0][FIX] dbs value has to be kept in case of special proxy config#3261
cvinh wants to merge 1 commit into
OCA:17.0from
invitu:17.0-fix-dbfilter_from_header

Conversation

@cvinh

@cvinh cvinh commented Apr 10, 2025

Copy link
Copy Markdown

Same as #2828

@matmicro

Copy link
Copy Markdown

I propose a change into the OCA module dbfilter_from_header.

The change is to replace the line:
https://github.com/OCA/server-tools/blob/16.0/dbfilter_from_header/override.py:20

dbs = [db for db in dbs if re.match(db_filter_hdr, db)]
And replace it by:

dbs = [db for db in dbs_orig if re.match(db_filter_hdr, db)]
This change will allow to combine dbfilter_from_header AND the basic dbfilter.
This is really useful the generate some powerful regex like:

dbfilter = ^prod_\w+
dbfilter_from_header = \w+_%d$

Or maybe this commit is a regression that was introduced, and do not allow anymore to use both filters at the same time: @cvinh
e39ed29

dantefromhell added a commit to dantefromhell/server-tools that referenced this pull request Jan 16, 2026
This is the equivalent fix to PR#3475 (for 18.0) and PR#3261 (for 17.0), based
on submitted PR#2828 (for 16.0).

Additionally it addresses the comment by @matmicro in PR#3261
OCA#3261 (comment)

@hbrunn hbrunn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants