mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:47:08 +00:00
Allow taking JWT secret from environment in production
This commit is contained in:
@@ -50,6 +50,14 @@ try {
|
||||
config.jwt.secret = buffer.toString("base64");
|
||||
console.warn("Autogenerated JWT secret (NODE_ENV != production)");
|
||||
}
|
||||
} else {
|
||||
if (!config.jwt) {
|
||||
config.jwt = {};
|
||||
}
|
||||
|
||||
if (!config.jwt.secret) {
|
||||
config.jwt.secret = process.env.DOUGAL_JWT_SECRET;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user