Skip to content

Commit

Permalink
Merge pull request #154 from kaleido-io/restore-certs
Browse files Browse the repository at this point in the history
restore certs
  • Loading branch information
nguyer authored Apr 12, 2024
2 parents 97b9d91 + db2ab96 commit 3cf9222
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions src/health/health.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ export class HealthController {
@HealthCheck()
readiness() {
return this.health.check([
() =>
this.http.pingCheck('ethconnect', `${this.blockchain.baseUrl}/status`, {
auth: {
username: this.blockchain.username,
password: this.blockchain.password,
},
}),
() => {
const httpOptions = getHttpRequestOptions(
this.blockchain.username,
this.blockchain.password,
);
return this.http.pingCheck('ethconnect', `${this.blockchain.baseUrl}/status`, {
auth: httpOptions.auth,
httpAgent: httpOptions.httpAgent,
});
},
]);
}
}
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getWebsocketOptions = (username: string, password: string): ClientO
return requestOptions;
};

export const getHttpRequestOptions = (username: string, password: string) => {
export const getHttpRequestOptions = (username: string, password: string):AxiosRequestConfig => {
const requestOptions: AxiosRequestConfig = {};
if (username !== '' && password !== '') {
requestOptions.auth = {
Expand Down

0 comments on commit 3cf9222

Please sign in to comment.