From 2642dde34570a75e29440318635b00843869bd05 Mon Sep 17 00:00:00 2001 From: Karl Date: Thu, 17 Jul 2025 17:08:14 +0100 Subject: [PATCH] notification fix --- routes/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/api.py b/routes/api.py index 8ababd7..a71bac8 100644 --- a/routes/api.py +++ b/routes/api.py @@ -148,8 +148,8 @@ def login_route(username: str, password: str) -> Response: def vapid_public_key(): """Provides the VAPID public key.""" public_key = current_app.config["VAPID_PUBLIC_KEY"] - # Clean up the key - public_key = public_key.replace("-----BEGIN PUBLIC KEY-----", "").replace("-----END PUBLIC KEY-----", "").strip() + # Clean up the key by removing headers, footers, and all whitespace + public_key = "".join(public_key.replace("-----BEGIN PUBLIC KEY-----", "").replace("-----END PUBLIC KEY-----", "").split()) return jsonify({"public_key": public_key})