From ea5ef5561997b9d2cef51b2cbbf524bc3f1dada0 Mon Sep 17 00:00:00 2001 From: Benjamin Eckel Date: Wed, 29 Jan 2025 12:40:05 -0600 Subject: [PATCH] Uppercase the http method --- src/http-context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http-context.ts b/src/http-context.ts index 718475c..d42705e 100644 --- a/src/http-context.ts +++ b/src/http-context.ts @@ -48,7 +48,7 @@ export class HttpContext { } const { headers, header, url: rawUrl, method: m } = req.json(); - const method = m ?? 'GET'; + const method = m?.toUpperCase() ?? 'GET'; const url = new URL(rawUrl); const isAllowed = this.allowedHosts.some((allowedHost) => {