Skip to content

Commit 1546b02

Browse files
committed
Use HTTP instead of HTTPS for label qr codes, to make the QR codes smaller.
1 parent d6f78b2 commit 1546b02

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/src/multiaccess/memberbooth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ def get_label_qr_code_url(label_id: int) -> str:
123123
# Uppercase scheme and netloc
124124
new_url = urlunparse(
125125
(
126-
parsed.scheme.upper(),
126+
# Uppercase scheme and netloc, as they are case-insensitive
127+
# Also replace HTTPS with HTTP. There will be a redirect to HTTPS anyway, using fewer
128+
# characters means we can get away with a smaller QR code.
129+
parsed.scheme.upper().replace("HTTPS", "HTTP"),
127130
parsed.netloc.upper(),
128131
parsed.path, # Note: makeradmin may be hosted in a subdirectory, so we cannot necessarily uppercase the whole path
129132
parsed.params,

0 commit comments

Comments
 (0)