add rate limits to all public endpoints
This commit is contained in:
parent
a38d8a91a1
commit
e3b826db5a
243 changed files with 2908 additions and 9 deletions
|
|
@ -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: ['pages'],
|
||||
|
|
@ -31,6 +32,12 @@ export const meta = {
|
|||
id: '8b741b3e-2c22-44b3-a15f-29949aa1601e',
|
||||
},
|
||||
},
|
||||
|
||||
// 300 calls per hour (match update)
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 300,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue