add rate limits to all public endpoints
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user