another try

This commit is contained in:
Karl 2025-07-17 17:49:50 +01:00
parent ac79f26373
commit 19bfa3e4d6

View File

@ -157,8 +157,8 @@ def vapid_public_key():
# Join the split lines to remove all whitespace and newlines # Join the split lines to remove all whitespace and newlines
base64_key = "".join(match.group(1).split()) base64_key = "".join(match.group(1).split())
# Convert to URL-safe base64 for the PushManager API # Convert to URL-safe base64 and remove padding for the PushManager API
url_safe_key = base64_key.replace('+', '-').replace('/', '_') url_safe_key = base64_key.replace('+', '-').replace('/', '_').rstrip('=')
return jsonify({"public_key": url_safe_key}) return jsonify({"public_key": url_safe_key})