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:
parent
6526968f2d
commit
e5ea882ed7
4 changed files with 136 additions and 0 deletions
|
|
@ -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 ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue