Commit e76f2cd
hclsys
fix(push-web): default VAPID subject to https://openclaw.ai instead of mailto:openclaw@localhost (#83134)
Apple Web Push (Safari, iOS PWA) rejects VAPID JWTs whose `sub` is
`mailto:openclaw@localhost` with `BadJwtToken`. The upstream `web-push`
README documents this restriction: VAPID subjects must be either
`https:` URLs or `mailto:` with a real domain — not `localhost`. The
result on first install with no `OPENCLAW_VAPID_SUBJECT` override was
that iOS PWA subscribers silently never received pushes.
Switch the default to `https://openclaw.ai` (the project's public URL)
so Apple's push endpoint accepts the JWT out of the box. Operators
who want a real contact mailbox can still override with
`OPENCLAW_VAPID_SUBJECT=mailto:ops@example.com`.
Test updates:
- `setVapidDetails` direct assertion now expects the new default.
- The "generates and persists VAPID keys" regression assertion is
relaxed to "valid VAPID subject (https: or mailto:) AND not
localhost", which is the actual contract the issue describes.1 parent 2c9f68f commit e76f2cd
2 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| |||
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
214 | | - | |
| 219 | + | |
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
0 commit comments