mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +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')
|
return await fs.promises.readFile(getEncryptionKeyPath(), 'utf8')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const encryptKey = generateEncryptKey()
|
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)
|
await fs.promises.writeFile(defaultLocation, encryptKey)
|
||||||
return encryptKey
|
return encryptKey
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user