mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
fix: fix obsolete calls
This commit is contained in:
parent
e6228ed22e
commit
0c0d9a9ec3
1 changed files with 4 additions and 4 deletions
|
@ -52,7 +52,7 @@ const handleBrowserRequests = (data, opts) => {
|
||||||
return createProxyRequestPromise(data, opts)
|
return createProxyRequestPromise(data, opts)
|
||||||
|
|
||||||
case ProxyPolicy.NEVER:
|
case ProxyPolicy.NEVER:
|
||||||
switch (data.proof.request.access) {
|
switch (data.proof.request.accessRestriction) {
|
||||||
case ProofAccessRestriction.NONE:
|
case ProofAccessRestriction.NONE:
|
||||||
case ProofAccessRestriction.GRANTED:
|
case ProofAccessRestriction.GRANTED:
|
||||||
return createDefaultRequestPromise(data, opts)
|
return createDefaultRequestPromise(data, opts)
|
||||||
|
@ -66,7 +66,7 @@ const handleBrowserRequests = (data, opts) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
case ProxyPolicy.ADAPTIVE:
|
case ProxyPolicy.ADAPTIVE:
|
||||||
switch (data.proof.request.access) {
|
switch (data.proof.request.accessRestriction) {
|
||||||
case ProofAccessRestriction.NONE:
|
case ProofAccessRestriction.NONE:
|
||||||
return createFallbackRequestPromise(data, opts)
|
return createFallbackRequestPromise(data, opts)
|
||||||
case ProofAccessRestriction.NOCORS:
|
case ProofAccessRestriction.NOCORS:
|
||||||
|
@ -151,8 +151,8 @@ const createProxyRequestPromise = (data, opts) => {
|
||||||
|
|
||||||
const requestData = {
|
const requestData = {
|
||||||
url: proxyUrl,
|
url: proxyUrl,
|
||||||
format: data.proof.request.format,
|
format: data.proof.response.format,
|
||||||
fetcherTimeout: fetcher[data.proof.request.fetcher].timeout
|
fetcherTimeout: data.proof.request.fetcher in fetcher ? fetcher[data.proof.request.fetcher].timeout : 30000
|
||||||
}
|
}
|
||||||
fetcher.http
|
fetcher.http
|
||||||
.fn(requestData, opts)
|
.fn(requestData, opts)
|
||||||
|
|
Loading…
Reference in a new issue