mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
feat: Allow postgres connections that require ssl mode (#409)
Closes #261
This commit is contained in:
parent
2c66d53a08
commit
18e231fcaa
3 changed files with 30 additions and 1 deletions
|
@ -6,9 +6,22 @@ dotenv.config({
|
|||
path: path.resolve(__dirname, '../.env'),
|
||||
});
|
||||
|
||||
function buildSSLConfig() {
|
||||
if (process.env.KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE === 'false') {
|
||||
return {
|
||||
rejectUnauthorized: false,
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
client: 'pg',
|
||||
connection: process.env.DATABASE_URL,
|
||||
connection: {
|
||||
connectionString: process.env.DATABASE_URL,
|
||||
ssl: buildSSLConfig(),
|
||||
},
|
||||
migrations: {
|
||||
tableName: 'migration',
|
||||
directory: path.join(__dirname, 'migrations'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue