feat: added env for dynamic secret to allow internal ip

This commit is contained in:
=
2025-04-07 21:43:17 +05:30
parent 74574c6c29
commit 141a821091
2 changed files with 2 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ export const verifyHostInputValidity = async (host: string, isGateway = false) =
inputHostIps.push(...resolvedIps);
}
if (!isGateway) {
if (!isGateway && !appCfg.DYNAMIC_SECRET_ALLOW_INTERNAL_IP) {
const isInternalIp = inputHostIps.some((el) => isPrivateIp(el));
if (isInternalIp) throw new BadRequestError({ message: "Invalid db host" });
}

View File

@@ -193,6 +193,7 @@ const envSchema = z
GATEWAY_RELAY_REALM: zpStr(z.string().optional()),
GATEWAY_RELAY_AUTH_SECRET: zpStr(z.string().optional()),
DYNAMIC_SECRET_ALLOW_INTERNAL_IP: zodStrBool.default("false"),
/* ----------------------------------------------------------------------------- */
/* App Connections ----------------------------------------------------------------------------- */