Confirm proxy use before the first web request (#657)

This commit is contained in:
Gregory Schier
2026-09-14 21:29:07 -07:00
committed by GitHub
parent fd95b4cba3
commit ff5db718ce
9 changed files with 275 additions and 1 deletions
@@ -1,5 +1,6 @@
import type { HttpResponse } from "@yaakapp-internal/models";
import { flushAllModelWrites } from "@yaakapp-internal/models";
import { confirmWebProxy } from "../lib/confirmWebProxy";
import { rpc } from "../lib/rpc";
import { getActiveCookieJar } from "./useActiveCookieJar";
import { getActiveEnvironment } from "./useActiveEnvironment";
@@ -10,6 +11,10 @@ async function sendAnyHttpRequestById(id: string | null): Promise<HttpResponse |
return null;
}
if (!(await confirmWebProxy())) {
return null;
}
await flushAllModelWrites();
return rpc("cmd_send_http_request", {