add FLOWISE_SECRETKEY_OVERWRITE

This commit is contained in:
Henry
2023-09-18 16:45:00 +01:00
parent c917e2f353
commit 9031057425
9 changed files with 54 additions and 77 deletions
+3
View File
@@ -396,6 +396,9 @@ const getEncryptionKeyPath = (): string => {
* @returns {Promise<string>}
*/
const getEncryptionKey = async (): Promise<string> => {
if (process.env.FLOWISE_SECRETKEY_OVERWRITE !== undefined && process.env.FLOWISE_SECRETKEY_OVERWRITE !== '') {
return process.env.FLOWISE_SECRETKEY_OVERWRITE
}
try {
return await fs.promises.readFile(getEncryptionKeyPath(), 'utf8')
} catch (error) {