diff --git a/settings.sample.json b/settings.sample.json index 98643d28..a5fb6592 100644 --- a/settings.sample.json +++ b/settings.sample.json @@ -73,7 +73,14 @@ "period": 86400000, "rate": 2880 } - ] + ], + "whitelists": { + "pubkeys": [], + "ipAddresses": [ + "::1", + "::ffff:10.10.10.1" + ] + } }, "client": { "subscription": { diff --git a/src/@types/settings.ts b/src/@types/settings.ts index b927e972..7e698c2a 100644 --- a/src/@types/settings.ts +++ b/src/@types/settings.ts @@ -52,6 +52,11 @@ export interface ContentLimits { maxLength?: number } +export interface EventWhitelists { + pubkeys?: Pubkey[] + ipAddresses?: string[] +} + export interface EventLimits { eventId?: EventIdLimits pubkey?: PubkeyLimits @@ -59,6 +64,7 @@ export interface EventLimits { createdAt?: CreatedAtLimits content?: ContentLimits rateLimits?: EventRateLimit[] + whitelists?: EventWhitelists } export interface ClientSubscriptionLimits {