From e2b46ddd2e7494d5e787cbb398b2481ba552482e Mon Sep 17 00:00:00 2001 From: Thomas T Date: Tue, 23 Jan 2024 11:25:05 +0100 Subject: [PATCH] Check if version is valid --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d12c3a5..e47e83e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,7 +34,7 @@ Bun.serve({ return res } const url = new URL(req.url) - if (url.searchParams.get('version') !== null) { // We have a version parameter + if (url.searchParams.get('version') !== null && allowedVersions.includes(url.searchParams.get('version') as string) ) { // We have a valid version parameter version = url.searchParams.get('version') as string } if (url.pathname === "/") return new Response("Agiliate is running", { headers })