Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional matching logic/modes #3

Open
slint opened this issue Feb 8, 2021 · 0 comments
Open

Additional matching logic/modes #3

slint opened this issue Feb 8, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@slint
Copy link
Member

slint commented Feb 8, 2021

Is your feature request related to a problem? Please describe.

Currently the only URL path matching mechanism is prefix-based, like e.g. having an active banner for every path starting with /deposit, which matches /deposit, /deposit/123, /deposit/123/info, etc.

For very specific matching (e.g. only for a specific record), this could cause unwanted matches. E.g. if the path is /record/123, then also /record/1234 would be matched.

Describe the solution you'd like

Having a configurable matching mode for each path, would solve this issue. There are a couple of options for implementing this:

  • Some "regex"-like matching with $
  • Adding a new match_method enum-like column to the table, allowing various types of matching (prefix-based, exact, etc.)
  • Having a config-based matching function (e.g. BANNERS_PATH_MATCHER), which allows easy overriding and customized logic.

In general, any solution should also take into account performance implications for fetching active banners, especially in cases where there are multiple active banners in the same period, but for many different paths. E.g. currently the matching logic is performed on the Python side, instead of it being delegated to the SQL query.

@slint slint added the enhancement New feature or request label Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant