*Abort trying to intercept if we are not logged in
This commit is contained in:
parent
f3ee68679b
commit
0274210bfb
|
@ -29,7 +29,7 @@ function logLargeObjects() {
|
|||
}
|
||||
setTimeout(logLargeObjects, timer);
|
||||
|
||||
let authStatus: KernelAuthStatus;
|
||||
export let authStatus: KernelAuthStatus;
|
||||
let authStatusKnown = false;
|
||||
let authStatusResolve: DataFn;
|
||||
let bridgeLoadedResolve: DataFn;
|
||||
|
|
|
@ -15,6 +15,7 @@ import { getTld, isDomain, isIp, normalizeDomain } from "./util.js";
|
|||
import tldEnum from "@lumeweb/tld-enum";
|
||||
import { resolve } from "@lumeweb/kernel-dns-client";
|
||||
import { blake2b, bufToHex } from "libskynet";
|
||||
import { authStatus } from "./main/background.js";
|
||||
|
||||
export default class WebEngine {
|
||||
private contentProviders: BaseProvider[] = [];
|
||||
|
@ -69,6 +70,9 @@ export default class WebEngine {
|
|||
}
|
||||
|
||||
private async proxyHandler(details: OnRequestDetailsType): Promise<any> {
|
||||
if (authStatus.loginComplete !== true) {
|
||||
return {};
|
||||
}
|
||||
let handle = null;
|
||||
for (const provider of this.contentProviders) {
|
||||
if (await provider.shouldHandleRequest(details)) {
|
||||
|
|
Reference in New Issue