mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-15 18:34:19 +01:00
Load VAPID keys from configuration
This commit is contained in:
@@ -104,7 +104,7 @@ const instanceV2Controller: AppController = async (c) => {
|
||||
streaming: `${wsProtocol}//${host}`,
|
||||
},
|
||||
vapid: {
|
||||
public_key: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
|
||||
public_key: await Conf.vapidPublicKey,
|
||||
},
|
||||
accounts: {
|
||||
max_featured_tags: 10,
|
||||
|
||||
@@ -2,6 +2,7 @@ import { nip19 } from 'nostr-tools';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AppController } from '@/app.ts';
|
||||
import { Conf } from '@/config.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { parseBody } from '@/utils/api.ts';
|
||||
import { getTokenHash } from '@/utils/auth.ts';
|
||||
@@ -76,6 +77,6 @@ export const pushSubscribeController: AppController = async (c) => {
|
||||
endpoint: subscription.endpoint,
|
||||
alerts: data?.alerts ?? {},
|
||||
policy: data?.policy ?? 'all',
|
||||
// TODO: server_key
|
||||
server_key: await Conf.vapidPublicKey,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user