spec(backend): APIのレートリミットをバイパスできるように (MisskeyIO#557)

This commit is contained in:
まっちゃとーにゅ 2024-03-21 16:01:58 +09:00 committed by GitHub
parent 9a65c8ca61
commit ee78828dda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -98,6 +98,8 @@ type Source = {
proxyRemoteFiles?: boolean;
videoThumbnailGenerator?: string;
bypassRateLimit?: { header: string; value: string }[];
signToActivityPubGet?: boolean;
perChannelMaxNoteCacheCount?: number;
@ -175,6 +177,7 @@ export type Config = {
mediaProxy: string;
externalMediaProxyEnabled: boolean;
videoThumbnailGenerator: string | null;
bypassRateLimit: { header: string; value: string }[] | undefined;
redis: RedisOptions & RedisOptionsSource;
redisForPubsub: RedisOptions & RedisOptionsSource;
redisForSystemQueue: RedisOptions & RedisOptionsSource;
@ -288,6 +291,7 @@ export function loadConfig(): Config {
videoThumbnailGenerator: config.videoThumbnailGenerator ?
config.videoThumbnailGenerator.endsWith('/') ? config.videoThumbnailGenerator.substring(0, config.videoThumbnailGenerator.length - 1) : config.videoThumbnailGenerator
: null,
bypassRateLimit: config.bypassRateLimit,
userAgent: `Misskey/${version} (${config.url})`,
clientEntry: clientManifest['src/_boot_.ts'],
clientManifestExists: clientManifestExists,