mirror of
https://github.com/fmhy/edit.git
synced 2025-07-29 23:32:17 +10:00
feat(api): ratelimiting
This commit is contained in:
parent
26213d9f91
commit
1148023b1a
10 changed files with 139 additions and 150 deletions
|
@ -2,7 +2,7 @@ name = "api"
|
|||
main = ".output/server/index.mjs"
|
||||
workers_dev = false
|
||||
account_id = "02f3b11d8d1017a20f95de4ba88fb5d6"
|
||||
compatibility_flags = [ "nodejs_compat" ]
|
||||
compatibility_flags = ["nodejs_compat"]
|
||||
compatibility_date = "2024-11-01"
|
||||
|
||||
routes = [
|
||||
|
@ -16,5 +16,11 @@ id = "6f18adea26a64d6b8858ffbdfd3f4cf2"
|
|||
[[unsafe.bindings]]
|
||||
name = "RATE_LIMITER"
|
||||
type = "ratelimit"
|
||||
namespace_id = "69420"
|
||||
# An identifier you define, that is unique to your Cloudflare account.
|
||||
# Must be an integer.
|
||||
namespace_id = "1001"
|
||||
|
||||
# Limit: the number of tokens allowed within a given period in a single
|
||||
# Cloudflare location
|
||||
# Period: the duration of the period, in seconds. Must be either 10 or 60
|
||||
simple = { limit = 100, period = 60 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue