Skip to content

Commit

Permalink
Check if version is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
huulbaek committed Jan 23, 2024
1 parent 63196c5 commit e2b46dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit e2b46dd

Please sign in to comment.