From 68684395a080a834d823b39e2e9641372bbafbfd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 2 Mar 2026 23:37:57 -0800 Subject: dependency audit --- src/routes/(app)/qr/[text]/raw/+server.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/routes/(app)/qr') diff --git a/src/routes/(app)/qr/[text]/raw/+server.ts b/src/routes/(app)/qr/[text]/raw/+server.ts index ad7fc6b1..77bb8a09 100644 --- a/src/routes/(app)/qr/[text]/raw/+server.ts +++ b/src/routes/(app)/qr/[text]/raw/+server.ts @@ -1,15 +1,13 @@ -import Qr from "qrcode-base64"; +import QRCode from "qrcode"; export async function GET({ params }) { const { text } = params; - const dataUri = Qr.drawImg(text, { size: 600 }); - const base64Data = dataUri.split(",")[1]; - const binaryData = Buffer.from(base64Data, "base64"); + const buffer = await QRCode.toBuffer(text, { width: 600, type: "png" }); - return new Response(binaryData, { + return new Response(buffer, { headers: { - "Content-Type": "image/gif", + "Content-Type": "image/png", "Cache-Control": "public, max-age=31536000, immutable", }, }); -- cgit v1.2.3