diff --git a/src/worker.ts b/src/worker.ts index 661d8e3..2669e41 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -151,7 +151,10 @@ const handleContact = async (request: Request, env: Env) => { export default { async fetch(request: Request, env: Env): Promise { const url = new URL(request.url); - if (url.pathname === "/api/contact") { + if ( + url.pathname === "/api/contact" || + url.pathname === "/api/contact/" + ) { if (request.method !== "POST") { return jsonResponse( { ok: false, error: "Method not allowed." },