summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/http-impl.qtart.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-06 12:32:31 +0200
committerFlorian Dold <florian@dold.me>2023-09-06 12:32:31 +0200
commit7450bede5b5809f6a496b7e68852a454386850e5 (patch)
treece4aedaad43ad095e643d96f5897883b70616c03 /packages/taler-util/src/http-impl.qtart.ts
parent07d71eb29704a148f7e7bb0c064cbbad056d5a50 (diff)
downloadwallet-core-7450bede5b5809f6a496b7e68852a454386850e5.tar.gz
wallet-core-7450bede5b5809f6a496b7e68852a454386850e5.tar.bz2
wallet-core-7450bede5b5809f6a496b7e68852a454386850e5.zip
get rid of deprecated bank API client, change allowHttp to requireTls
Diffstat (limited to 'packages/taler-util/src/http-impl.qtart.ts')
-rw-r--r--packages/taler-util/src/http-impl.qtart.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-util/src/http-impl.qtart.ts b/packages/taler-util/src/http-impl.qtart.ts
index 3e076e96d..fb642ac89 100644
--- a/packages/taler-util/src/http-impl.qtart.ts
+++ b/packages/taler-util/src/http-impl.qtart.ts
@@ -41,11 +41,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;
}
/**
@@ -72,7 +72,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,
{