Skip to content

Commit 3cf9222

Browse files
authored
Merge pull request #154 from kaleido-io/restore-certs
restore certs
2 parents 97b9d91 + db2ab96 commit 3cf9222

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/health/health.controller.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ export class HealthController {
2121
@HealthCheck()
2222
readiness() {
2323
return this.health.check([
24-
() =>
25-
this.http.pingCheck('ethconnect', `${this.blockchain.baseUrl}/status`, {
26-
auth: {
27-
username: this.blockchain.username,
28-
password: this.blockchain.password,
29-
},
30-
}),
24+
() => {
25+
const httpOptions = getHttpRequestOptions(
26+
this.blockchain.username,
27+
this.blockchain.password,
28+
);
29+
return this.http.pingCheck('ethconnect', `${this.blockchain.baseUrl}/status`, {
30+
auth: httpOptions.auth,
31+
httpAgent: httpOptions.httpAgent,
32+
});
33+
},
3134
]);
3235
}
3336
}

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const getWebsocketOptions = (username: string, password: string): ClientO
4646
return requestOptions;
4747
};
4848

49-
export const getHttpRequestOptions = (username: string, password: string) => {
49+
export const getHttpRequestOptions = (username: string, password: string):AxiosRequestConfig => {
5050
const requestOptions: AxiosRequestConfig = {};
5151
if (username !== '' && password !== '') {
5252
requestOptions.auth = {

0 commit comments

Comments
 (0)