From 38d5de7f144278b5d9855af781d16708821c089f Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:18:11 +0000 Subject: [PATCH 1/3] Initial plan From 4252bde8d7c6f763dc1f5a4056c1890828f21a5f Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:28:21 +0000 Subject: [PATCH 2/3] Fix Safari/WebKit manifest.json redirect bug - Add .json to static file bypass regex to prevent manifest.json from entering auth middleware - Add /manifest.json to blockedPaths to prevent redirect to manifest after login - Fixes issue #164 where Safari/WebKit users were redirected to manifest.json after login Co-authored-by: SSoggyTacoMan <80040706+SSoggyTacoMan@users.noreply.github.com> --- src/proxy.ts | 2 +- src/utils/auth/redirect.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proxy.ts b/src/proxy.ts index 493dac6a..ef8c4678 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -12,7 +12,7 @@ export async function proxy(request: NextRequest) { pathname.startsWith("/_next") || // pathname.startsWith("/api") || pathname === "/favicon.ico" || - /\.(css|js|ts|tsx|jsx|woff2?|ttf|png|jpg|jpeg|gif|svg|webmanifest)$/.test(pathname) || + /\.(css|js|ts|tsx|jsx|woff2?|ttf|png|jpg|jpeg|gif|svg|webmanifest|json)$/.test(pathname) || request.headers.get("purpose") === "prefetch" || request.headers.get("Next-Router-Prefetch") === "1" || request.headers.get("RSC") === "1" || diff --git a/src/utils/auth/redirect.ts b/src/utils/auth/redirect.ts index 5f64dca9..c152c1eb 100644 --- a/src/utils/auth/redirect.ts +++ b/src/utils/auth/redirect.ts @@ -27,7 +27,7 @@ export function getValidRedirectPath(path: string | null | undefined): string { } // Blacklist certain paths for security - const blockedPaths = ['/api/', '/auth/sign-out']; + const blockedPaths = ['/api/', '/auth/sign-out', '/manifest.json']; if (blockedPaths.some(blocked => path.startsWith(blocked))) { return defaultPath; } From f726c2fbd73360f3b6a17a538beb76fa722f204a Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:37:30 +0000 Subject: [PATCH 3/3] Add AI CODE START/END markers to Safari manifest.json bug fix Co-authored-by: SSoggyTacoMan <80040706+SSoggyTacoMan@users.noreply.github.com> --- src/proxy.ts | 2 ++ src/utils/auth/redirect.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/proxy.ts b/src/proxy.ts index ef8c4678..6ab7a65a 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -12,7 +12,9 @@ export async function proxy(request: NextRequest) { pathname.startsWith("/_next") || // pathname.startsWith("/api") || pathname === "/favicon.ico" || + // AI CODE START /\.(css|js|ts|tsx|jsx|woff2?|ttf|png|jpg|jpeg|gif|svg|webmanifest|json)$/.test(pathname) || + // AI CODE END request.headers.get("purpose") === "prefetch" || request.headers.get("Next-Router-Prefetch") === "1" || request.headers.get("RSC") === "1" || diff --git a/src/utils/auth/redirect.ts b/src/utils/auth/redirect.ts index c152c1eb..7e039c73 100644 --- a/src/utils/auth/redirect.ts +++ b/src/utils/auth/redirect.ts @@ -27,7 +27,9 @@ export function getValidRedirectPath(path: string | null | undefined): string { } // Blacklist certain paths for security + // AI CODE START const blockedPaths = ['/api/', '/auth/sign-out', '/manifest.json']; + // AI CODE END if (blockedPaths.some(blocked => path.startsWith(blocked))) { return defaultPath; }