Merge pull request #3369 from akhilmhdh/fix/doc-p-access-image

feat: added env for dynamic secret to allow internal ip
This commit is contained in:
Akhil Mohan
2025-04-07 22:30:59 +05:30
committed by GitHub
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 ----------------------------------------------------------------------------- */