Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Expose feature flag to frontend as well
Fang-Pen Linf6db76a23c40
diff --git a/backend/src/ee/routes/v1/index.ts b/backend/src/ee/routes/v1/index.tsindex 2228c43bd7..e104a83550 100644--- a/backend/src/ee/routes/v1/index.ts+++ b/backend/src/ee/routes/v1/index.ts@@ -110,7 +110,7 @@ export const registerV1EERoutes = async (server: FastifyZodProvider) => {async (pkiRouter) => {await pkiRouter.register(registerCaCrlRouter, { prefix: "/crl" });// Notice: current this feature is still in development and is not yet ready for production.- if (getConfig().ACME_FEATURE_ENABLED === true) {+ if (getConfig().isAcmeFeatureEnabled === true) {await pkiRouter.register(registerPkiAcmeRouter, { prefix: "/acme" });}},diff --git a/backend/src/lib/config/env.ts b/backend/src/lib/config/env.tsindex 94ce79e944..b60971b1fe 100644--- a/backend/src/lib/config/env.ts+++ b/backend/src/lib/config/env.ts@@ -399,6 +399,7 @@ const envSchema = z(data.NODE_ENV === "development" && data.ROTATION_DEVELOPMENT_MODE) || data.NODE_ENV === "test",isDailyResourceCleanUpDevelopmentMode:data.NODE_ENV === "development" && data.DAILY_RESOURCE_CLEAN_UP_DEVELOPMENT_MODE,+ isAcmeFeatureEnabled: data.NODE_ENV === "development" && data.ACME_FEATURE_ENABLED === true,isAcmeDevelopmentMode: data.NODE_ENV === "development" && data.ACME_DEVELOPMENT_MODE,isProductionMode: data.NODE_ENV === "production" || IS_PACKAGED,isRedisSentinelMode: Boolean(data.REDIS_SENTINEL_HOSTS),diff --git a/backend/src/server/plugins/serve-ui.ts b/backend/src/server/plugins/serve-ui.tsindex b71451b6e5..4330f93978 100644--- a/backend/src/server/plugins/serve-ui.ts+++ b/backend/src/server/plugins/serve-ui.ts@@ -31,7 +31,10 @@ export const registerServeUI = async (CAPTCHA_SITE_KEY: appCfg.CAPTCHA_SITE_KEY,POSTHOG_API_KEY: appCfg.POSTHOG_PROJECT_API_KEY,INTERCOM_ID: appCfg.INTERCOM_ID,- TELEMETRY_CAPTURING_ENABLED: appCfg.TELEMETRY_ENABLED+ TELEMETRY_CAPTURING_ENABLED: appCfg.TELEMETRY_ENABLED,+ // The feature flag to enable/disable the ACME feature.+ // Will be removed once the feature is ready for production.+ ACME_FEATURE_ENABLED: appCfg.isAcmeFeatureEnabled};const js = `window.__INFISICAL_RUNTIME_ENV__ = Object.freeze(${JSON.stringify(config)});`;return res.send(js);