File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,14 @@ const { Transaction } = require('sequelize');
1818 */
1919const isSslEnabled = process . env . DB_SSL_ENABLED === 'true' ;
2020
21+ // Determine if the server's certificate should be validated against the local CA bundle.
22+ // Defaults to true (most secure). This is only overridden if SSL is enabled AND the
23+ // DB_SSL_REJECT_UNAUTHORIZED variable is explicitly set.
24+ let rejectUnauthorized = true ;
25+ if ( isSslEnabled && typeof process . env . DB_SSL_REJECT_UNAUTHORIZED !== 'undefined' ) {
26+ rejectUnauthorized = process . env . DB_SSL_REJECT_UNAUTHORIZED !== 'false' ;
27+ }
28+
2129module . exports = {
2230 /**
2331 * Development environment database configuration
@@ -41,9 +49,11 @@ module.exports = {
4149 dialectOptions : {
4250 ssl : {
4351 require : true ,
44- rejectUnauthorized : true ,
45- // Read CA certificate for SSL connection verification
46- ca : fs . readFileSync ( __dirname + '/../src/config/global-bundle.pem' ) . toString ( ) ,
52+ rejectUnauthorized : rejectUnauthorized ,
53+ // Only include the CA if we are validating the certificate
54+ ...( rejectUnauthorized && {
55+ ca : fs . readFileSync ( __dirname + '/../src/config/global-bundle.pem' ) . toString ( ) ,
56+ } ) ,
4757 } ,
4858 } ,
4959 } ) ,
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ import { createSentryPlugin } from './plugins/sentry-plugin';
5656 *
5757 * If a query exceeds this complexity, it will be rejected before execution.
5858 */
59- const MAX_COMPLEXITY = 2500 ;
59+ const MAX_COMPLEXITY = 4000 ;
6060
6161/**
6262 * GraphQL schema definition
You can’t perform that action at this time.
0 commit comments