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
|
|
@ -18,9 +18,10 @@ export const meta = {
|
|||
|
||||
kind: 'write:account',
|
||||
|
||||
// 60 calls per hour
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 20,
|
||||
max: 60,
|
||||
},
|
||||
|
||||
errors: {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ export const meta = {
|
|||
id: '920f7c2d-6208-4b76-8082-e632020f5883',
|
||||
},
|
||||
},
|
||||
|
||||
// 2 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 2,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@ export const meta = {
|
|||
id: '70ca08ba-6865-4630-b6fb-8494759aa754',
|
||||
},
|
||||
},
|
||||
|
||||
// 2 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 2,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ export const meta = {
|
|||
id: '92658936-c625-4273-8326-2d790129256e',
|
||||
},
|
||||
},
|
||||
|
||||
// 3 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 3,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ export const meta = {
|
|||
ref: 'Clip',
|
||||
},
|
||||
},
|
||||
|
||||
// 3 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 3,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ export const meta = {
|
|||
ref: 'Clip',
|
||||
},
|
||||
},
|
||||
|
||||
// 3 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 3,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ export const meta = {
|
|||
ref: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ export const meta = {
|
|||
id: 'aff017de-190e-434b-893e-33a9ff5049d8',
|
||||
},
|
||||
},
|
||||
|
||||
// 2 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 2,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Clip',
|
||||
},
|
||||
|
||||
// 3 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 3,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ export const meta = {
|
|||
id: '90c3a9e8-b321-4dae-bf57-2bf79bbcc187',
|
||||
},
|
||||
},
|
||||
|
||||
// 3 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 3,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ export const meta = {
|
|||
optional: false, nullable: false,
|
||||
ref: 'Clip',
|
||||
},
|
||||
|
||||
// 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