clean up vesktop:// protocol handler

This commit is contained in:
Vendicated
2025-10-19 03:14:33 +02:00
parent fa23c630cb
commit d232797889
3 changed files with 10 additions and 14 deletions
+1 -3
View File
@@ -13,9 +13,7 @@ import { isPathInDirectory } from "./utils/isPathInDirectory";
const STATIC_DIR = join(__dirname, "..", "..", "static");
export async function handleVesktopStaticProtocol(path: string, req: Request) {
const staticPath = new URL(path, "vesktop://").pathname;
const fullPath = join(STATIC_DIR, staticPath);
const fullPath = join(STATIC_DIR, path);
if (!isPathInDirectory(fullPath, STATIC_DIR)) {
return new Response(null, { status: 404 });
}