huge optimizations
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
} from "../../db";
|
||||
import { metrics } from "../../metrics";
|
||||
import { encodeMessage } from "../../protocol";
|
||||
import { getConfig } from "../../config";
|
||||
import { requireClientAccess, requireFeatureAccess, requirePermission } from "../../rbac";
|
||||
import {
|
||||
canUserAccessClient,
|
||||
@@ -176,6 +177,12 @@ export async function handleClientRoutes(
|
||||
if (error instanceof Response) return error;
|
||||
return new Response("Forbidden", { status: 403 });
|
||||
}
|
||||
if (
|
||||
req.headers.get("x-overlord-thumbnail-source") === "dashboard" &&
|
||||
getConfig().thumbnails.dashboardEnabled === false
|
||||
) {
|
||||
return Response.json({ ok: false, disabled: true }, { headers: deps.CORS_HEADERS });
|
||||
}
|
||||
const { requestThumbnailRegen, markThumbnailRequested, getThumbnailVersion, waitForThumbnail, clearThumbnailRequest } = await import("../../thumbnails");
|
||||
markThumbnailRequested(clientId);
|
||||
const target = clientManager.getClient(clientId);
|
||||
|
||||
Reference in New Issue
Block a user