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

Allow Empty Query Parameter Values in Redirect Rules #2386

Open
2Friendly4You opened this issue Mar 7, 2025 · 2 comments
Open

Allow Empty Query Parameter Values in Redirect Rules #2386

2Friendly4You opened this issue Mar 7, 2025 · 2 comments
Labels
Milestone

Comments

@2Friendly4You
Copy link

Summary

Currently, Shlink does not allow setting an empty query parameter value when creating redirect rules. For example, xxx.com?test is not possible, as a value is required. It would be useful to allow parameters without values.

Use case

Some APIs or services expect query parameters without values (e.g., ?debug or ?feature).

Certain tracking or feature flag implementations rely on the presence of a parameter, regardless of its value.

This would improve flexibility when setting up redirect rules.

@2Friendly4You
Copy link
Author

Sorry to annoy you again

@acelaya
Copy link
Member

acelaya commented Mar 7, 2025

Sorry to annoy you again

No worries 🙂. This issue makes sense.

I think Shlink should allow the next scenarios when it comes to query parameter redirects.

  • Match exact name and value (as it does now).
  • Match the presence of a parameter regardless of its value.
  • Match the presence of a parameter with no value at all.

I need to give it a thought and see if it's better to handle some if those with a new type of redirect condition or it's easier to simple refactor existing one.

Using different conditions would probably make validation easier to handle.

@acelaya acelaya added this to the 4.5.0 milestone Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants