Add vanity /qr URL aliasing mobile_app redirector#792
Open
janbrasna wants to merge 6 commits into
Open
Conversation
janbrasna
marked this pull request as ready for review
November 19, 2025 10:44
janbrasna
commented
Jan 13, 2026
janbrasna
left a comment
Collaborator
Author
There was a problem hiding this comment.
Wondering where to document this endpoint alias best so it's not just tribal knowledge. Ideally in some code using it, but there's no consumer yet 😅 🤷
Comment on lines
+37
to
+38
| product = request.GET.get("product") or request.GET.get("p") | ||
| campaign = request.GET.get("campaign") or request.GET.get("c") |
Collaborator
Author
There was a problem hiding this comment.
Hmh, do we actually need to allowlist these somewhere? Was there a place that would list any permissible args?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #792 +/- ##
=======================================
Coverage 87.61% 87.61%
=======================================
Files 156 156
Lines 10816 10816
=======================================
Hits 9476 9476
Misses 1340 1340 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-line summary
The shorter the URL, the more readable the QR code gets. This adds some aliasing to be able to link shorter mobile_app redirector URLs.
Significant changes and points to review
Shorter params could also be used on the original endpoint, there's no restriction.
Tests were added to demonstrate mixing'n'matching the patterns between the approaches.
Issue / Bugzilla link
#765
Testing
pytest -k test_redirects.pyhttp://localhost:8000/qr
http://localhost:8000/qr?c=foo
http://localhost:8000/fy-NL/qr/?product=quux
http://localhost:8000/de-BE/browsers/mobile/app/?p=klar&campaign=qr-focus (will show store error outside germany unless using android ua)
http://localhost:8000/browsers/mobile/app/?product=focus&campaign=qr-focus (control)