Check existence of cert before providing to readfile()
This commit is contained in:
parent
bc13eed372
commit
74ebda03b2
1 changed files with 8 additions and 4 deletions
|
|
@ -52,10 +52,14 @@ module.exports = async (
|
|||
) => {
|
||||
try {
|
||||
const Http = Axios.create({
|
||||
httpsAgent: new httpsAgent.Agent({
|
||||
ca: await FS.readFile(CA),
|
||||
key: await FS.readFile(CA_KEY)
|
||||
})
|
||||
httpsAgent: new httpsAgent.Agent(
|
||||
CA && CA_KEY
|
||||
? {
|
||||
ca: await FS.readFile(CA),
|
||||
key: await FS.readFile(CA_KEY)
|
||||
}
|
||||
: {}
|
||||
)
|
||||
})
|
||||
|
||||
const sanitizeLNDError = (message = '') => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue