add rate limits to all public endpoints

This commit is contained in:
Hazelnoot 2024-11-22 13:43:06 -05:00
parent a38d8a91a1
commit e3b826db5a
243 changed files with 2908 additions and 9 deletions

View file

@ -14,6 +14,12 @@ export const meta = {
errors: {
},
// 2 calls per second
limit: {
duration: 1000,
max: 2,
},
} as const;
export const paramDef = {

View file

@ -19,6 +19,12 @@ export const meta = {
optional: false, nullable: false,
items: { ref: 'ReversiGameLite' },
},
// 2 calls per second
limit: {
duration: 1000,
max: 2,
},
} as const;
export const paramDef = {

View file

@ -19,6 +19,12 @@ export const meta = {
optional: false, nullable: false,
items: { ref: 'UserLite' },
},
// 2 calls per second
limit: {
duration: 1000,
max: 2,
},
} as const;
export const paramDef = {

View file

@ -34,6 +34,12 @@ export const meta = {
optional: true,
ref: 'ReversiGameDetailed',
},
// 2 calls per second
limit: {
duration: 1000,
max: 2,
},
} as const;
export const paramDef = {

View file

@ -25,6 +25,12 @@ export const meta = {
optional: false, nullable: false,
ref: 'ReversiGameDetailed',
},
// 2 calls per second
limit: {
duration: 1000,
max: 2,
},
} as const;
export const paramDef = {

View file

@ -32,6 +32,12 @@ export const meta = {
id: '6e04164b-a992-4c93-8489-2123069973e1',
},
},
// 2 calls per second
limit: {
duration: 1000,
max: 2,
},
} as const;
export const paramDef = {

View file

@ -30,6 +30,12 @@ export const meta = {
},
},
},
// 5 calls per second
limit: {
duration: 1000,
max: 5,
},
} as const;
export const paramDef = {