mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 14:14:10 +00:00
[FIX] respect custom ENV_PATH when setting API_TOKEN_SALT
This commit is contained in:
parent
7e1ef71d9b
commit
ac0c306a0b
@ -86,7 +86,7 @@ const createSaltIfNotDefined = () => {
|
||||
}
|
||||
|
||||
const salt = crypto.randomBytes(16).toString('hex');
|
||||
strapi.fs.appendFile('.env', `API_TOKEN_SALT=${salt}\n`);
|
||||
strapi.fs.appendFile(process.env.ENV_PATH || '.env', `API_TOKEN_SALT=${salt}\n`);
|
||||
strapi.config.set('admin.apiToken.salt', salt);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user