Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Labels
Plan
Issues
25
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cokoapps
server
Commits
5589a8ec
Commit
5589a8ec
authored
11 months ago
by
Yannis Barlas
Browse files
Options
Downloads
Patches
Plain Diff
feat(db-manager): add POSTGRES_ALLOW_SELF_SIGNED_CERTIFICATES env variable
parent
1d88a8c5
No related branches found
No related tags found
1 merge request
!91
Pg ssl
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dbManager/connectionConfig.js
+7
-0
7 additions, 0 deletions
src/dbManager/connectionConfig.js
src/utils/env.js
+7
-0
7 additions, 0 deletions
src/utils/env.js
with
14 additions
and
0 deletions
src/dbManager/connectionConfig.js
+
7
−
0
View file @
5589a8ec
const
config
=
require
(
'
config
'
)
const
{
isEnvVariableTrue
}
=
require
(
'
../utils/env
'
)
const
connection
=
process
.
env
.
DATABASE_URL
||
(
config
[
'
pubsweet-server
'
]
&&
config
[
'
pubsweet-server
'
].
db
)
if
(
isEnvVariableTrue
(
process
.
env
.
POSTGRES_ALLOW_SELF_SIGNED_CERTIFICATES
))
{
if
(
!
connection
.
ssl
)
connection
.
ssl
=
{}
connection
.
ssl
.
rejectUnauthorized
=
false
}
module
.
exports
=
connection
This diff is collapsed.
Click to expand it.
src/utils/env.js
0 → 100644
+
7
−
0
View file @
5589a8ec
const
isEnvVariableTrue
=
variable
=>
{
return
variable
===
'
1
'
||
variable
===
1
||
variable
===
'
true
'
}
module
.
exports
=
{
isEnvVariableTrue
,
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment