Add vanity /qr URL aliasing mobile_app redirector#792
Open
janbrasna wants to merge 5 commits intomozmeao:mainfrom
Open
Add vanity /qr URL aliasing mobile_app redirector#792janbrasna wants to merge 5 commits intomozmeao:mainfrom
janbrasna wants to merge 5 commits intomozmeao:mainfrom
Conversation
janbrasna
commented
Jan 13, 2026
Collaborator
Author
janbrasna
left a comment
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?
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)