mirror of
https://github.com/Cameri/nostream.git
synced 2025-08-09 04:31:59 +02:00
feat: add rate limit whitelists for pubkeys/ips
This commit is contained in:
@@ -73,7 +73,14 @@
|
|||||||
"period": 86400000,
|
"period": 86400000,
|
||||||
"rate": 2880
|
"rate": 2880
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"whitelists": {
|
||||||
|
"pubkeys": [],
|
||||||
|
"ipAddresses": [
|
||||||
|
"::1",
|
||||||
|
"::ffff:10.10.10.1"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"subscription": {
|
"subscription": {
|
||||||
|
@@ -52,6 +52,11 @@ export interface ContentLimits {
|
|||||||
maxLength?: number
|
maxLength?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface EventWhitelists {
|
||||||
|
pubkeys?: Pubkey[]
|
||||||
|
ipAddresses?: string[]
|
||||||
|
}
|
||||||
|
|
||||||
export interface EventLimits {
|
export interface EventLimits {
|
||||||
eventId?: EventIdLimits
|
eventId?: EventIdLimits
|
||||||
pubkey?: PubkeyLimits
|
pubkey?: PubkeyLimits
|
||||||
@@ -59,6 +64,7 @@ export interface EventLimits {
|
|||||||
createdAt?: CreatedAtLimits
|
createdAt?: CreatedAtLimits
|
||||||
content?: ContentLimits
|
content?: ContentLimits
|
||||||
rateLimits?: EventRateLimit[]
|
rateLimits?: EventRateLimit[]
|
||||||
|
whitelists?: EventWhitelists
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ClientSubscriptionLimits {
|
export interface ClientSubscriptionLimits {
|
||||||
|
Reference in New Issue
Block a user