Skip to content

Commit

Permalink
revert knexConfig name change
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jan 16, 2025
1 parent ed41ada commit 0769356
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/util/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ const knexConnection = (config) => {
const problem = validateConfig(config);
if (problem != null) throw problem;
// We ignore maximumPoolSize when using Knex.
const { maximumPoolSize, ...rest } = config;
if (rest.ssl === true) {
const { maximumPoolSize, ...knexConfig } = config;
if (knexConfig.ssl === true) {
// Slonik seems to specify `false` for `rejectUnauthorized` whenever SSL is
// specified:
// https://github.com/gajus/slonik/issues/159#issuecomment-891089466. We do
// the same here so that Knex will connect to the database in the same way
// as Slonik.
rest.ssl = { rejectUnauthorized: false };
knexConfig.ssl = { rejectUnauthorized: false };
}
return rest;
return knexConfig;
};


Expand Down

0 comments on commit 0769356

Please sign in to comment.