Merge pull request #3418 from Infisical/allow-internal-ip-connection-env-var

Feature: Add General Env Var for Allowing Internal IP Connections
This commit is contained in:
Scott Wilson
2025-04-15 08:26:00 -07:00
committed by GitHub
6 changed files with 22 additions and 2 deletions
@@ -42,7 +42,7 @@ export const verifyHostInputValidity = async (host: string, isGateway = false) =
inputHostIps.push(...resolvedIps);
}
if (!isGateway && !appCfg.DYNAMIC_SECRET_ALLOW_INTERNAL_IP) {
if (!isGateway && !(appCfg.DYNAMIC_SECRET_ALLOW_INTERNAL_IP || appCfg.ALLOW_INTERNAL_IP_CONNECTIONS)) {
const isInternalIp = inputHostIps.some((el) => isPrivateIp(el));
if (isInternalIp) throw new BadRequestError({ message: "Invalid db host" });
}