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 {
|
try {
|
||||||
const Http = Axios.create({
|
const Http = Axios.create({
|
||||||
httpsAgent: new httpsAgent.Agent({
|
httpsAgent: new httpsAgent.Agent(
|
||||||
ca: await FS.readFile(CA),
|
CA && CA_KEY
|
||||||
key: await FS.readFile(CA_KEY)
|
? {
|
||||||
})
|
ca: await FS.readFile(CA),
|
||||||
|
key: await FS.readFile(CA_KEY)
|
||||||
|
}
|
||||||
|
: {}
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const sanitizeLNDError = (message = '') => {
|
const sanitizeLNDError = (message = '') => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue