diff --git a/routes/api.py b/routes/api.py index 748b131..61a79aa 100644 --- a/routes/api.py +++ b/routes/api.py @@ -157,8 +157,8 @@ def vapid_public_key(): # Join the split lines to remove all whitespace and newlines base64_key = "".join(match.group(1).split()) - # Convert to URL-safe base64 for the PushManager API - url_safe_key = base64_key.replace('+', '-').replace('/', '_') + # Convert to URL-safe base64 and remove padding for the PushManager API + url_safe_key = base64_key.replace('+', '-').replace('/', '_').rstrip('=') return jsonify({"public_key": url_safe_key})