authorized fetch #217
the implementation is copied from the other places we already check HTTP signatures, and cross-checked with Firefish's implementation
This commit is contained in:
@@ -88,6 +88,7 @@ type Source = {
|
||||
customMOTD?: string[];
|
||||
|
||||
signToActivityPubGet?: boolean;
|
||||
checkActivityPubGetSignature?: boolean;
|
||||
|
||||
perChannelMaxNoteCacheCount?: number;
|
||||
perUserNotificationsMaxCount?: number;
|
||||
@@ -146,6 +147,7 @@ export type Config = {
|
||||
proxyRemoteFiles: boolean | undefined;
|
||||
customMOTD: string[] | undefined;
|
||||
signToActivityPubGet: boolean | undefined;
|
||||
checkActivityPubGetSignature: boolean | undefined;
|
||||
|
||||
version: string;
|
||||
host: string;
|
||||
@@ -253,6 +255,7 @@ export function loadConfig(): Config {
|
||||
proxyRemoteFiles: config.proxyRemoteFiles,
|
||||
customMOTD: config.customMOTD,
|
||||
signToActivityPubGet: config.signToActivityPubGet,
|
||||
checkActivityPubGetSignature: config.checkActivityPubGetSignature,
|
||||
mediaProxy: externalMediaProxy ?? internalMediaProxy,
|
||||
externalMediaProxyEnabled: externalMediaProxy !== null && externalMediaProxy !== internalMediaProxy,
|
||||
videoThumbnailGenerator: config.videoThumbnailGenerator ?
|
||||
|
||||
Reference in New Issue
Block a user