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
|
|
@ -24,6 +24,12 @@ export const meta = {
|
|||
ref: 'Role',
|
||||
},
|
||||
},
|
||||
|
||||
// 2 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 2,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,12 @@ export const meta = {
|
|||
ref: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
// 3 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 3,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Role',
|
||||
},
|
||||
|
||||
// 5 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 5,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ export const meta = {
|
|||
required: ['id', 'user'],
|
||||
},
|
||||
},
|
||||
|
||||
// 2 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 2,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue