mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-02 08:15:55 +00:00
feat: hide the version from the connector probe when the login page hides it #896
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user