Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
Changed how custom CA certificate is added on https egress
Browse files Browse the repository at this point in the history
  • Loading branch information
etoster committed Jul 2, 2020
1 parent 9c2b4fb commit 4a1c3e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ services:
- CORE_EGRESS_EXCHANGE=${CORE_EGRESS_EXCHANGE}
- CORE_EGRESS_HTTP_QUEUE=${CORE_EGRESS_HTTP_QUEUE}
- CORE_EGRESS_HTTP_CTAG=${CORE_EGRESS_HTTP_CTAG}
- NODE_EXTRA_CA_CERTS=${TLS_CERTFILE}
volumes:
- ./src/compose/volumes/certs/:/etc/ssl/certs/
##########################################
i40-aas-grpc-endpoint-ingress:
image: sapi40/i40-aas-grpc-endpoint-ingress
Expand Down
11 changes: 2 additions & 9 deletions src/ts/cmd/https-endpoint-egress/src/WebClient/WebClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,10 @@ class WebClient {
auth: {
username: username as string,
password: password as string,
},
httpsAgent: new https.Agent({
ca: cert as string
}),
}
});
} else {
response = await Axios.post<T>(url, body, {
httpsAgent: new https.Agent({
ca: cert as string
}),
});
response = await Axios.post<T>(url, body);
}
return response as AxiosResponse<T>;
}
Expand Down

0 comments on commit 4a1c3e3

Please sign in to comment.