feat: hide the version from the connector probe when the login page hides it #896

This commit is contained in:
Linus Rath
2026-10-17 19:18:21 +02:00
parent 03031fcb13
commit 8583c9efef
2 changed files with 22 additions and 3 deletions
+5 -2
View File
@@ -15,7 +15,8 @@ import { TARGET_NAMES } from '@/lib/connector/registry';
* here, and the answer is narrower than the login page it sits next to. It
* says nothing about accounts, domains or the mail server - only the product,
* its version, the branded app name, and the target names, which are a
* compile-time constant.
* compile-time constant. The version follows loginShowVersion, like the login
* page (#896); the connector only needs the target names to warn.
*
* `appName` can be a customer's own branding, so the whole endpoint is gated
* on `connectorEnabled` for deployments that would rather disclose nothing.
@@ -36,7 +37,9 @@ export async function GET() {
product: 'bulwark-webmail',
appName:
configManager.get<string>('appName', '') || process.env.NEXT_PUBLIC_APP_NAME || 'Bulwark',
version: process.env.NEXT_PUBLIC_APP_VERSION || null,
version: configManager.get<boolean>('loginShowVersion', true)
? process.env.NEXT_PUBLIC_APP_VERSION || null
: null,
connectorPath: '/connector',
targets: TARGET_NAMES,
},