From 43bf0f9c8ff899b0b4b9968d9f5b7451bd270214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Arturo=20Cabral=20Mej=C3=ADa?= Date: Sat, 24 Dec 2022 13:57:05 -0500 Subject: [PATCH] feat: add network config to settings --- settings.sample.json | 4 ++++ src/@types/settings.ts | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/settings.sample.json b/settings.sample.json index 1b6a690..bce4373 100644 --- a/settings.sample.json +++ b/settings.sample.json @@ -6,6 +6,10 @@ "pubkey": "replace-with-your-pubkey", "contact": "operator@your-domain.com" }, + "network": { + "max_payload_size": 131072, + "remote_ip_header": "x-forwarded-for" + }, "workers": { "count": 0 }, diff --git a/src/@types/settings.ts b/src/@types/settings.ts index 053ad4f..b927e97 100644 --- a/src/@types/settings.ts +++ b/src/@types/settings.ts @@ -9,6 +9,11 @@ export interface Info { contact?: string } +export interface Network { + max_payload_size?: number + remote_ip_header?: string +} + export interface EventIdLimits { minLeadingZeroBits?: number } @@ -87,6 +92,7 @@ export interface Worker { export interface ISettings { info: Info + network?: Network workers?: Worker limits?: Limits }