mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-24 15:00:45 +03:00
Merge pull request #1474 from FlowiseAI/bugfix/Credential-Decrypt
Bugfix/Credential Decrypt
This commit is contained in:
@@ -875,7 +875,9 @@ export const getEncryptionKey = async (): Promise<string> => {
|
||||
return await fs.promises.readFile(getEncryptionKeyPath(), 'utf8')
|
||||
} catch (error) {
|
||||
const encryptKey = generateEncryptKey()
|
||||
const defaultLocation = path.join(getUserHome(), '.flowise', 'encryption.key')
|
||||
const defaultLocation = process.env.SECRETKEY_PATH
|
||||
? path.join(process.env.SECRETKEY_PATH, 'encryption.key')
|
||||
: path.join(getUserHome(), '.flowise', 'encryption.key')
|
||||
await fs.promises.writeFile(defaultLocation, encryptKey)
|
||||
return encryptKey
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user