From 4991b813bfdf1367e71d86f2248851f257a224a8 Mon Sep 17 00:00:00 2001 From: Martin Berka Date: Sat, 2 Dec 2023 20:54:39 +0100 Subject: [PATCH] =?UTF-8?q?Umo=C5=BEnit=20zad=C3=A1n=C3=AD=20trusted=20IPs?= =?UTF-8?q?=20s=20b=C3=ADl=C3=BDmi=20znaky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/index.ts b/server/src/index.ts index c8c3daa..7326459 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -38,7 +38,7 @@ if (HTTP_REMOTE_USER_ENABLED) { if (!process.env.HTTP_REMOTE_TRUSTED_IPS) { throw new Error('Je zapnutý login z hlaviček, ale není nastaven rozsah adres ze kterých hlavička může přijít.'); } - const HTTP_REMOTE_TRUSTED_IPS = process.env.HTTP_REMOTE_TRUSTED_IPS.split(','); + const HTTP_REMOTE_TRUSTED_IPS = process.env.HTTP_REMOTE_TRUSTED_IPS.split(',').map(ip => ip.trim()); //TODO: nevim jak udelat console.log pouze pro "debug" //console.log("Budu věřit hlavičkám z: " + HTTP_REMOTE_TRUSTED_IPS); app.set('trust proxy', HTTP_REMOTE_TRUSTED_IPS);