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

View file

@ -10,6 +10,7 @@ import { DI } from '@/di-symbols.js';
import { ModerationLogService } from '@/core/ModerationLogService.js';
import { RoleService } from '@/core/RoleService.js';
import { ApiError } from '../../../error.js';
import ms from 'ms';
export const meta = {
tags: ['gallery'],
@ -31,6 +32,11 @@ export const meta = {
id: 'c86e09de-1c48-43ac-a435-1c7e42ed4496',
},
},
limit: {
duration: ms('1hour'),
max: 300,
},
} as const;
export const paramDef = {