We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 526cf72 commit 3a685c4Copy full SHA for 3a685c4
1 file changed
adminforth/modules/configValidator.ts
@@ -1255,6 +1255,14 @@ export default class ConfigValidator implements IConfigValidator {
1255
throw new Error(`Invalid AdminForth config: ${errors.join(', ')}`);
1256
}
1257
1258
+ const adminforthSecret = process.env.ADMINFORTH_SECRET;
1259
+ if (!adminforthSecret) {
1260
+ throw new Error(`ADMINFORTH_SECRET environment not set
1261
+ Please set ADMINFORTH_SECRET environment variable to a random string to secure your admin panel.
1262
+ ADMINFORTH_SECRET variable is used to sign JWT tokens
1263
+ `);
1264
+ }
1265
+
1266
this.adminforth.config = newConfig as AdminForthConfig;
1267
1268
0 commit comments