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