From b2e968efafa08b58f315a3eeeffcc0d13ecd8b61 Mon Sep 17 00:00:00 2001 From: skidoodle Date: Tue, 23 Jan 2024 15:50:08 +0100 Subject: [PATCH] xd --- src/pages/api/validate.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pages/api/validate.ts b/src/pages/api/validate.ts index 4013856..1963150 100644 --- a/src/pages/api/validate.ts +++ b/src/pages/api/validate.ts @@ -14,6 +14,11 @@ export default async function handler( return res.status(400).json({ error: `Hiányzó paraméter: ${missingParam}` }) } + const domain = link.split('/')[2] + if (domain !== 'erettsegi.albert.lol') { + return res.status(400).json({ error: 'Érvénytelen link' }) + } + try { res.setHeader('Cache-Control', 's-maxage=31536000') const { protocol, host } = new URL(link)