*Move https redirect to request handler directly
This commit is contained in:
parent
29125ab6a3
commit
8a0de28d32
|
@ -136,10 +136,6 @@ export default class IpfsProvider extends BaseProvider {
|
||||||
let fetchMethod: typeof fetchIpfs | typeof fetchIpns;
|
let fetchMethod: typeof fetchIpfs | typeof fetchIpns;
|
||||||
let err;
|
let err;
|
||||||
let contentType: string;
|
let contentType: string;
|
||||||
if (urlObj.protocol == "https") {
|
|
||||||
urlObj.protocol = "http";
|
|
||||||
return { redirectUrl: urlObj.toString() };
|
|
||||||
}
|
|
||||||
let contentSize = 0;
|
let contentSize = 0;
|
||||||
|
|
||||||
let cachedPage: { contentType: string; data: Blob } | null = null;
|
let cachedPage: { contentType: string; data: Blob } | null = null;
|
||||||
|
|
|
@ -108,6 +108,15 @@ export default class WebEngine {
|
||||||
return { redirectUrl: navRedirect as string };
|
return { redirectUrl: navRedirect as string };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const provider = this.getRequestProvider(details.requestId);
|
||||||
|
if (provider) {
|
||||||
|
let urlObj = new URL(details.url);
|
||||||
|
if (urlObj.protocol == "https") {
|
||||||
|
urlObj.protocol = "http";
|
||||||
|
return { redirectUrl: urlObj.toString() };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return this.processHandler(details, "handleRequest");
|
return this.processHandler(details, "handleRequest");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue