Skip to content

Commit e6d37b7

Browse files
committed
feat: add YouTube online status chip with cookie-aware probing
Show Moonlit vs user cookie health on the homepage, persist system status in data/status.json, and tighten Netscape cookie validation without false invalids.
1 parent 4f0ac55 commit e6d37b7

8 files changed

Lines changed: 1170 additions & 73 deletions

File tree

src/app/api/stream/extract/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NextResponse } from "next/server";
22
import crypto from "crypto";
33
import { youtubeErrorCode } from "@/lib/apiError";
4-
import { readRequestCookies } from "@/lib/cookies";
4+
import { readRequestCookies, sanitizeUserCookies } from "@/lib/cookies";
55
import {
66
enforceYouTubeExtractLimit,
77
handleYoutubeGuardError,
@@ -17,7 +17,7 @@ export async function POST(req: Request) {
1717
try {
1818
const body = await req.json();
1919
const { url } = body;
20-
const cookies = readRequestCookies(req) ?? body.cookies;
20+
const cookies = readRequestCookies(req) ?? sanitizeUserCookies(body.cookies);
2121

2222
if (!url || typeof url !== "string") {
2323
return NextResponse.json({ error: "Missing url" }, { status: 400 });

0 commit comments

Comments
 (0)