From 2220b0384751b6fb6dd4b9b23fb8b084790c8e89 Mon Sep 17 00:00:00 2001 From: Yann Stepienik Date: Fri, 6 Oct 2023 17:33:05 +0100 Subject: [PATCH] [release] v0.10.0-unstable27 --- package.json | 2 +- src/utils/middleware.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9264f21..e876caf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cosmos-server", - "version": "0.10.0-unstable26", + "version": "0.10.0-unstable27", "description": "", "main": "test-server.js", "bugs": { diff --git a/src/utils/middleware.go b/src/utils/middleware.go index 04881f9..e75be2b 100644 --- a/src/utils/middleware.go +++ b/src/utils/middleware.go @@ -305,7 +305,7 @@ func Restrictions(RestrictToConstellation bool, WhitelistInboundIPs []string) fu isWhitelistPassing := !isUsingWhiteList || isInWhitelist // check if the request is coming from the constellation IP range 192.168.201.0/24 - if (!isInConstellationPassing || !isWhitelistPassing) { + if (!isInConstellationPassing && !isWhitelistPassing) { Log("Request from " + ip + " is blocked because of restrictions isInConstellationPassing: " + fmt.Sprintf("%v", isInConstellationPassing) + " and isWhitelistPassing: " + fmt.Sprintf("%v", isWhitelistPassing)) http.Error(w, "Access denied", http.StatusForbidden) return