add rate limits to all public endpoints
This commit is contained in:
@@ -25,6 +25,12 @@ export const meta = {
|
||||
ref: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
// 2 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 2,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
||||
@@ -45,6 +45,12 @@ export const meta = {
|
||||
id: '85a5377e-b1e9-4617-b0b9-5bea73331e49',
|
||||
},
|
||||
},
|
||||
|
||||
// 2 calls per second
|
||||
limit: {
|
||||
duration: 1000,
|
||||
max: 2,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
||||
@@ -63,6 +63,12 @@ export const meta = {
|
||||
id: '85a5377e-b1e9-4617-b0b9-5bea73331e49',
|
||||
},
|
||||
},
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
||||
Reference in New Issue
Block a user