From eec06c1a24bfb8acf8817c9b675ffb340aaae940 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 2 Oct 2025 21:48:08 -0700 Subject: [PATCH] explain --- src/server.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server.tsx b/src/server.tsx index 326ed18..61193d6 100644 --- a/src/server.tsx +++ b/src/server.tsx @@ -78,6 +78,7 @@ app.on("GET", ["/js/:path{.+}", "/shared/:path{.+}"], async c => { // app routes // +// inject browser-nav.js into NOSE apps when loaded in a NOSE iframe app.use("*", async (c, next) => { await next() @@ -92,7 +93,6 @@ app.use("*", async (c, next) => { const secFetchDest = c.req.header('Sec-Fetch-Dest') const isIframe = secFetchDest === 'iframe' - if (!isIframe) return const originalBody = await c.res.text() @@ -105,7 +105,6 @@ app.use("*", async (c, next) => { modifiedBody = originalBody.replace('', `\n${shimScript}`) } - // Return modified response c.res = new Response(modifiedBody, { status: c.res.status, headers: c.res.headers