Skip to content

Commit

Permalink
[streaming] modify database connection to work with CA
Browse files Browse the repository at this point in the history
  • Loading branch information
thread-koder committed Nov 15, 2022
1 parent 25c4b37 commit 354a4b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion streaming/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const dbUrlToConfig = (dbUrl) => {
const ssl = params.query && params.query.ssl;

if (ssl && ssl === 'true' || ssl === '1') {
config.ssl = true;
config.ssl = {
rejectUnauthorized: true,
ca: fs.readFileSync(`/etc/ssl/certs/database/db_cert.crt`).toString()
}
}

return config;
Expand Down

0 comments on commit 354a4b5

Please sign in to comment.