From 7450bede5b5809f6a496b7e68852a454386850e5 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Sep 2023 12:32:31 +0200 Subject: get rid of deprecated bank API client, change allowHttp to requireTls --- packages/taler-util/src/http-impl.node.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/taler-util/src/http-impl.node.ts') diff --git a/packages/taler-util/src/http-impl.node.ts b/packages/taler-util/src/http-impl.node.ts index 07648a28d..528d303be 100644 --- a/packages/taler-util/src/http-impl.node.ts +++ b/packages/taler-util/src/http-impl.node.ts @@ -63,11 +63,11 @@ const textDecoder = new TextDecoder(); export class HttpLibImpl implements HttpRequestLibrary { private throttle = new RequestThrottler(); private throttlingEnabled = true; - private allowHttp = false; + private requireTls = false; constructor(args?: HttpLibArgs) { this.throttlingEnabled = args?.enableThrottling ?? false; - this.allowHttp = args?.allowHttp ?? false; + this.requireTls = args?.requireTls ?? false; } /** @@ -94,7 +94,7 @@ export class HttpLibImpl implements HttpRequestLibrary { `request to origin ${parsedUrl.origin} was throttled`, ); } - if (!this.allowHttp && parsedUrl.protocol !== "https:") { + if (this.requireTls && parsedUrl.protocol !== "https:") { throw TalerError.fromDetail( TalerErrorCode.WALLET_NETWORK_ERROR, { -- cgit v1.2.3