From d8d1952304b1f66a0620c56fa69d98ad36d3acc7 Mon Sep 17 00:00:00 2001 From: nate Date: Thu, 19 Mar 2026 10:06:14 +0400 Subject: [PATCH] fix: elysia issues 2 --- apps/web/src/routes/auth.ts | 5 ++++- apps/web/src/routes/dashboard.ts | 5 ++++- apps/web/src/views/settings.ejs | 5 ++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/web/src/routes/auth.ts b/apps/web/src/routes/auth.ts index 9cebca3..738de8e 100644 --- a/apps/web/src/routes/auth.ts +++ b/apps/web/src/routes/auth.ts @@ -6,7 +6,10 @@ import { createRateLimiter } from "../utils/rate-limit"; const EMAIL_HMAC_KEY = process.env.EMAIL_HMAC_KEY || "pingql-default-hmac-key"; function redir(to: string) { - return new Response(null, { status: 302, headers: { Location: to } }); + return new Response( + ``, + { headers: { "content-type": "text/html; charset=utf-8", "cache-control": "no-store" } }, + ); } // ── Per-IP rate limiting for auth endpoints ─────────────────────────── diff --git a/apps/web/src/routes/dashboard.ts b/apps/web/src/routes/dashboard.ts index d15913a..4feb715 100644 --- a/apps/web/src/routes/dashboard.ts +++ b/apps/web/src/routes/dashboard.ts @@ -111,7 +111,10 @@ export function html(template: string, data: Record = {}) { } function redirect(to: string) { - return new Response(null, { status: 302, headers: { Location: to } }); + return new Response( + ``, + { headers: { "content-type": "text/html; charset=utf-8", "cache-control": "no-store" } }, + ); } async function getAccountId(cookie: any, headers: any): Promise<{ accountId: string; keyId: string | null; plan: string } | null> { diff --git a/apps/web/src/views/settings.ejs b/apps/web/src/views/settings.ejs index a365493..c802d20 100644 --- a/apps/web/src/views/settings.ejs +++ b/apps/web/src/views/settings.ejs @@ -141,13 +141,12 @@

Sub-Keys

Create separate keys for different apps, scripts, or teammates.

- -