From d66576b4518c97f768e2d454ed2ee2d068737fdb Mon Sep 17 00:00:00 2001 From: Karl Date: Thu, 17 Jul 2025 17:30:02 +0100 Subject: [PATCH] last fix --- routes/api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routes/api.py b/routes/api.py index 3c16d43..748b131 100644 --- a/routes/api.py +++ b/routes/api.py @@ -156,7 +156,11 @@ def vapid_public_key(): # Join the split lines to remove all whitespace and newlines base64_key = "".join(match.group(1).split()) - return jsonify({"public_key": base64_key}) + + # Convert to URL-safe base64 for the PushManager API + url_safe_key = base64_key.replace('+', '-').replace('/', '_') + + return jsonify({"public_key": url_safe_key}) @api_blueprint.route("/save-subscription", methods=["POST"])