From 0c0d9a9ec3a83a7074c81b4f006a63f69c85186e Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 13 Jul 2023 10:37:36 +0200 Subject: [PATCH] fix: fix obsolete calls --- src/proofs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/proofs.js b/src/proofs.js index 4cc8c16..82af153 100644 --- a/src/proofs.js +++ b/src/proofs.js @@ -52,7 +52,7 @@ const handleBrowserRequests = (data, opts) => { return createProxyRequestPromise(data, opts) case ProxyPolicy.NEVER: - switch (data.proof.request.access) { + switch (data.proof.request.accessRestriction) { case ProofAccessRestriction.NONE: case ProofAccessRestriction.GRANTED: return createDefaultRequestPromise(data, opts) @@ -66,7 +66,7 @@ const handleBrowserRequests = (data, opts) => { } case ProxyPolicy.ADAPTIVE: - switch (data.proof.request.access) { + switch (data.proof.request.accessRestriction) { case ProofAccessRestriction.NONE: return createFallbackRequestPromise(data, opts) case ProofAccessRestriction.NOCORS: @@ -151,8 +151,8 @@ const createProxyRequestPromise = (data, opts) => { const requestData = { url: proxyUrl, - format: data.proof.request.format, - fetcherTimeout: fetcher[data.proof.request.fetcher].timeout + format: data.proof.response.format, + fetcherTimeout: data.proof.request.fetcher in fetcher ? fetcher[data.proof.request.fetcher].timeout : 30000 } fetcher.http .fn(requestData, opts)