fix: recover expired Basic Auth sessions in the current tab

This commit is contained in:
ji ruo committed 2026-11-10 16:28:23 +08:00
1 parent a05a886d3d
commit 0ff2130f46
7 files changed
+275 -20

No files matched your search

+2 -1
View File
@@ -7,6 +7,7 @@ import { RotateCcwIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
import { Dialog, DialogContent } from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { apiFetch } from "@/lib/api";
import { auth } from "@/lib/auth";
function AuthenticatedImage({
@@ -39,7 +40,7 @@ function AuthenticatedImage({
const token = auth.getToken();
setCaptureTimestamp(null);
fetch(imageSrc, {
apiFetch(imageSrc, {
credentials: "same-origin",
headers: token ? { Authorization: `Bearer ${token}` } : undefined,
})