mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 02:26:40 +00:00
Allow app config override for encryptWithRootEncryptionKey
This commit is contained in:
@@ -250,8 +250,11 @@ const cryptographyFactory = () => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const encryptWithRootEncryptionKey = (data: string) => {
|
const encryptWithRootEncryptionKey = (
|
||||||
const appCfg = getConfig();
|
data: string,
|
||||||
|
appCfgOverride?: Pick<TEnvConfig, "ROOT_ENCRYPTION_KEY" | "ENCRYPTION_KEY">
|
||||||
|
) => {
|
||||||
|
const appCfg = appCfgOverride || getConfig();
|
||||||
const rootEncryptionKey = appCfg.ROOT_ENCRYPTION_KEY;
|
const rootEncryptionKey = appCfg.ROOT_ENCRYPTION_KEY;
|
||||||
const encryptionKey = appCfg.ENCRYPTION_KEY;
|
const encryptionKey = appCfg.ENCRYPTION_KEY;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user