Skip to content

Commit 2ebd311

Browse files
authored
Merge pull request #1474 from FlowiseAI/bugfix/Credential-Decrypt
Bugfix/Credential Decrypt
2 parents 45a42c4 + 383f612 commit 2ebd311

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/server/src/utils/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,9 @@ export const getEncryptionKey = async (): Promise<string> => {
875875
return await fs.promises.readFile(getEncryptionKeyPath(), 'utf8')
876876
} catch (error) {
877877
const encryptKey = generateEncryptKey()
878-
const defaultLocation = path.join(getUserHome(), '.flowise', 'encryption.key')
878+
const defaultLocation = process.env.SECRETKEY_PATH
879+
? path.join(process.env.SECRETKEY_PATH, 'encryption.key')
880+
: path.join(getUserHome(), '.flowise', 'encryption.key')
879881
await fs.promises.writeFile(defaultLocation, encryptKey)
880882
return encryptKey
881883
}

0 commit comments

Comments
 (0)