feat(api): ratelimiting

because some group of idiots like me so much that they spam my endpoint
This commit is contained in:
taskylizard 2024-07-10 03:47:04 +00:00
parent 9e91f608b9
commit a69a834899
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
4 changed files with 44 additions and 7 deletions

View file

@ -3,3 +3,9 @@ main = ".output/server/index.mjs"
workers_dev = true
account_id = "fe5d9bd14160b07939282e45f63eb5ad"
compatibility_date = "2022-09-10"
[[unsafe.bindings]]
name = "RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001"
simple = { limit = 100, period = 30 }