Spaces:
Sleeping
Sleeping
Trần Viết Sơn
commited on
Commit
•
c14fe98
1
Parent(s):
9594d5a
fix: config database support ssl reject
Browse files
backend/src/config/database.ts
CHANGED
@@ -21,6 +21,9 @@ export class DatabaseConfigService implements TypeOrmOptionsFactory {
|
|
21 |
database: this.configService.get('db.name'),
|
22 |
password: this.configService.get('db.password'),
|
23 |
entities: [path.join(__dirname, '../**/*.entity{.ts,.js}')],
|
|
|
|
|
|
|
24 |
maxQueryExecutionTime: this.configService.get('db.slow_limit'),
|
25 |
};
|
26 |
}
|
|
|
21 |
database: this.configService.get('db.name'),
|
22 |
password: this.configService.get('db.password'),
|
23 |
entities: [path.join(__dirname, '../**/*.entity{.ts,.js}')],
|
24 |
+
ssl: {
|
25 |
+
rejectUnauthorized: false,
|
26 |
+
},
|
27 |
maxQueryExecutionTime: this.configService.get('db.slow_limit'),
|
28 |
};
|
29 |
}
|
backend/src/config/typeorm.ts
CHANGED
@@ -17,5 +17,8 @@ export default new DataSource({
|
|
17 |
username: process.env.DB_USER,
|
18 |
password: process.env.DB_PASSWORD,
|
19 |
entities: [path.join(__dirname, '../**/*.entity{.ts,.js}')],
|
|
|
|
|
|
|
20 |
migrations: [migrationsPath],
|
21 |
});
|
|
|
17 |
username: process.env.DB_USER,
|
18 |
password: process.env.DB_PASSWORD,
|
19 |
entities: [path.join(__dirname, '../**/*.entity{.ts,.js}')],
|
20 |
+
ssl: {
|
21 |
+
rejectUnauthorized: false,
|
22 |
+
},
|
23 |
migrations: [migrationsPath],
|
24 |
});
|