fix(security): resolve all critical, high, and medium security vulnerabilities
This commit is contained in:
1 parent
da26dd1c8d
commit
dc88677169
33 files changed
+438
-85
No files matched your search
@@ -52,5 +52,18 @@ export function validateEnv(config: Record<string, unknown>) {
|
||||
throw new Error(`Environment Validation Error: ${messages}`);
|
||||
}
|
||||
|
||||
if (validatedConfig.NODE_ENV === 'production') {
|
||||
if (!validatedConfig.JWT_ACCESS_SECRET) {
|
||||
throw new Error(
|
||||
'Environment Validation Error: JWT_ACCESS_SECRET is strictly required in production!',
|
||||
);
|
||||
}
|
||||
if (!validatedConfig.JWT_REFRESH_SECRET) {
|
||||
throw new Error(
|
||||
'Environment Validation Error: JWT_REFRESH_SECRET is strictly required in production!',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return validatedConfig;
|
||||
}
|
||||
Reference in new issue
Block a user