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
|
|
@ -11,6 +11,7 @@ import { RoleService } from '@/core/RoleService.js';
|
|||
import { DriveService } from '@/core/DriveService.js';
|
||||
import type { Config } from '@/config.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
import ms from 'ms';
|
||||
|
||||
export const meta = {
|
||||
tags: ['drive'],
|
||||
|
|
@ -63,6 +64,12 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'DriveFile',
|
||||
},
|
||||
|
||||
// 100 calls per minute
|
||||
limit: {
|
||||
duration: 1000 * 60,
|
||||
max: 100,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue