mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 19:40:34 +00:00
feat(push): accept the TREK apps' push relay as a push service
The apps subscribe to Web Push like a browser, with their own key pair, but with an endpoint on liketrek's relay: only liketrek holds the apps' APNs and FCM keys. The server encrypts exactly as for a browser (RFC 8291), so the relay hands on ciphertext it cannot read and the device decrypts it. Lookalike hosts stay refused.
This commit is contained in:
@@ -20,6 +20,11 @@ export const PUSH_SERVICE_HOSTS: readonly string[] = [
|
||||
'push.services.mozilla.com',
|
||||
// Safari on macOS, and Home Screen apps on iOS and iPadOS 16.4+.
|
||||
'web.push.apple.com',
|
||||
// The TREK apps' push relay. The app subscribes with its own key pair, the
|
||||
// server encrypts exactly as for a browser, and the relay hands the ciphertext
|
||||
// to Apple or Google, so it never reads a notification. Only liketrek holds
|
||||
// the apps' APNs and FCM keys, which is why every server goes through it.
|
||||
'push.liketrek.com',
|
||||
];
|
||||
|
||||
/** Services that hand out per-region or per-cluster hosts under one domain. */
|
||||
|
||||
Reference in New Issue
Block a user