Skip to content

Commit

Permalink
Document VAPID_EMAIL
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Nov 28, 2024
1 parent 5dbd05c commit 80a6a5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 8 additions & 2 deletions backend/vapid.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ import sbp from '@sbp/sbp'
let vapidPublicKey: string
let vapidPrivateKey: Object

// TODO: Load from configuration
const vapid = { VAPID_EMAIL: 'mailto:[email protected]' }
// The Voluntary Application Server Identification (VAPID) email field is "a
// stable identity for the application server" that "can be used by a push
// service to establish behavioral expectations for an application server"
// RFC 8292
if (!process.env.VAPID_EMAIL) {
console.warn('Missing VAPID identification. Please set VAPID_EMAIL to a value like "mailto:some@example".')
}
const vapid = { VAPID_EMAIL: process.env.VAPID_EMAIL || 'mailto:[email protected]' }

export const initVapid = async () => {
const vapidKeyPair = await sbp('chelonia/db/get', '_private_immutable_vapid_key').then(async (vapidKeyPair: string): Promise<[Object, string]> => {
Expand Down
5 changes: 0 additions & 5 deletions giconf.json

This file was deleted.

0 comments on commit 80a6a5e

Please sign in to comment.