diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-11-07 21:44:24 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-11-07 21:47:59 -0500 |
| commit | 9be808177a06b33892be6fdd7c1cb31cf3b924fa (patch) | |
| tree | 7e4920566cfc112af62a8a403ef2c7283fccab51 | |
| parent | 9e6f19f0f188eaa7f8b6be21c8405786cfb0dddd (diff) | |
Remove push subscriptions when rotating the VAPID key by hand.
| -rw-r--r-- | src/vapid/app.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vapid/app.rs b/src/vapid/app.rs index 7d872ed..ebd2446 100644 --- a/src/vapid/app.rs +++ b/src/vapid/app.rs @@ -29,6 +29,11 @@ impl Vapid { // of the change. All we have to do is remove the existing key, so that the server can know // to do so. tx.vapid().clear().await?; + // Delete outstanding subscriptions for the existing VAPID key, as well. They're + // unserviceable once we lose the key. Clients can resubscribe when they process the next + // key rotation event, which will be quite quickly once the running server notices that the + // VAPID key has been removed. + tx.push().clear().await?; tx.commit().await?; Ok(()) |
