Skip to content

Commit 75d568f

Browse files
committed
fix: encrypt staging database transactions
1 parent 4317115 commit 75d568f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/typeorm.config.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ config();
5151
const configService = new ConfigService();
5252

5353
const isProduction = configService.get('NODE_ENV') === 'production';
54+
const isStaging = configService.get('NODE_ENV') === 'staging';
55+
5456
const { host, port, user, password, database } = PostgressConnectionStringParser.parse(
5557
configService.get('DATABASE_URL'),
5658
);
@@ -114,9 +116,9 @@ export const dataSourceOptions = {
114116
BloomBackend1718728423454,
115117
],
116118
subscribers: [],
117-
ssl: isProduction,
119+
ssl: isProduction || isStaging,
118120
extra: {
119-
ssl: isProduction ? { rejectUnauthorized: false } : null,
121+
ssl: isProduction || isStaging ? { rejectUnauthorized: false } : null,
120122
},
121123
};
122124

0 commit comments

Comments
 (0)