From 9bb2d7396dc18d4cd13b3256e4119ed98d955ff2 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:51:09 -0400 Subject: [PATCH] Apparently Response.redirect does not work with relative paths --- functions/api/auth/mobile/login.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions/api/auth/mobile/login.ts b/functions/api/auth/mobile/login.ts index 3313618..0f349ee 100644 --- a/functions/api/auth/mobile/login.ts +++ b/functions/api/auth/mobile/login.ts @@ -1,3 +1,8 @@ -export async function onRequestGet(context: RequestContext) { - return Response.redirect("/api/auth/oauth"); +export async function onRequestGet(_context: RequestContext) { + return new Response(null, { + headers: { + location: "/api/auth/oauth", + }, + status: 302, + }); }