1
0

add rate limits to all public endpoints

This commit is contained in:
Hazelnoot
2024-11-22 13:43:06 -05:00
parent a38d8a91a1
commit e3b826db5a
243 changed files with 2908 additions and 9 deletions
@@ -11,6 +11,7 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
import { RoleService } from '@/core/RoleService.js';
import { ApiError } from '../../../error.js';
import ms from 'ms';
export const meta = {
tags: ['drive'],
@@ -34,6 +35,12 @@ export const meta = {
id: '5eb8d909-2540-4970-90b8-dd6f86088121',
},
},
// 100 calls per minute
limit: {
duration: 1000 * 60,
max: 100,
},
} as const;
export const paramDef = {