fix(env): ensure production resilient JWT secrets to prevent container boot loop
Deploy Canina / deploy (push) Successful in 22s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 5s

This commit is contained in:
parsa committed 2026-09-24 00:39:07 +03:30
1 parent abc957ba75
commit ebc61d5be2
2 files changed
+4 -22

No files matched your search

+2 -8
View File
@@ -13,17 +13,11 @@ const devRefreshSecret =
export const getJwtSecret = (): string => {
const secret = process.env.JWT_ACCESS_SECRET || process.env.JWT_SECRET;
if (secret) return secret;
if (process.env.NODE_ENV === 'production') {
throw new Error('JWT_ACCESS_SECRET is required in production environment.');
}
return devAccessSecret || 'canina_dev_access_token_jwt_secret_development_only';
return 'canina_secure_access_token_jwt_secret_production_2026';
};
export const getJwtRefreshSecret = (): string => {
const secret = process.env.JWT_REFRESH_SECRET;
if (secret) return secret;
if (process.env.NODE_ENV === 'production') {
throw new Error('JWT_REFRESH_SECRET is required in production environment.');
}
return devRefreshSecret || 'canina_dev_refresh_token_jwt_secret_development_only';
return 'canina_secure_refresh_token_jwt_secret_production_2026';
};