From 7768b60a583a4792113db3a689d54eaacf01c74a Mon Sep 17 00:00:00 2001 From: TZGyn Date: Sat, 31 May 2025 00:08:41 +0800 Subject: [PATCH] update webhook content type check --- src/routes/webhook/tradingview/+server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/webhook/tradingview/+server.ts b/src/routes/webhook/tradingview/+server.ts index f1a2397..3107add 100644 --- a/src/routes/webhook/tradingview/+server.ts +++ b/src/routes/webhook/tradingview/+server.ts @@ -6,7 +6,7 @@ import { z } from 'zod' export const POST = async ({ locals, request }) => { const type = request.headers.get('Content-Type') - if (type !== 'application/json; charset=utf-8') { + if (!type || !type.startsWith('application/json')) { return new Response() }