@@ -428,7 +428,17 @@ export const getEnvironmentVariable = (name: string): string | undefined => {
428
428
* @returns {string }
429
429
*/
430
430
const getEncryptionKeyFilePath = ( ) : string => {
431
- const checkPaths = [ path . join ( getUserHome ( ) , '.flowise' , 'encryption.key' ) ]
431
+ const checkPaths = [
432
+ path . join ( __dirname , '..' , '..' , 'encryption.key' ) ,
433
+ path . join ( __dirname , '..' , '..' , 'server' , 'encryption.key' ) ,
434
+ path . join ( __dirname , '..' , '..' , '..' , 'encryption.key' ) ,
435
+ path . join ( __dirname , '..' , '..' , '..' , 'server' , 'encryption.key' ) ,
436
+ path . join ( __dirname , '..' , '..' , '..' , '..' , 'encryption.key' ) ,
437
+ path . join ( __dirname , '..' , '..' , '..' , '..' , 'server' , 'encryption.key' ) ,
438
+ path . join ( __dirname , '..' , '..' , '..' , '..' , '..' , 'encryption.key' ) ,
439
+ path . join ( __dirname , '..' , '..' , '..' , '..' , '..' , 'server' , 'encryption.key' ) ,
440
+ path . join ( getUserHome ( ) , '.flowise' , 'encryption.key' )
441
+ ]
432
442
for ( const checkPath of checkPaths ) {
433
443
if ( fs . existsSync ( checkPath ) ) {
434
444
return checkPath
@@ -437,7 +447,7 @@ const getEncryptionKeyFilePath = (): string => {
437
447
return ''
438
448
}
439
449
440
- const getEncryptionKeyPath = ( ) : string => {
450
+ export const getEncryptionKeyPath = ( ) : string => {
441
451
return process . env . SECRETKEY_PATH ? path . join ( process . env . SECRETKEY_PATH , 'encryption.key' ) : getEncryptionKeyFilePath ( )
442
452
}
443
453
0 commit comments