From e7bd691d5382b82cc21c2c9dde6c0aea33dc0d25 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Fri, 16 May 2025 14:17:41 +0200 Subject: [PATCH] fix(core): disable unsupported chrome devtool path --- main.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.ts b/main.ts index e44c0bf..eeea500 100644 --- a/main.ts +++ b/main.ts @@ -3,6 +3,14 @@ import { type State } from './utils.ts' import { contentType } from 'jsr:@std/media-types@1/content-type' export const app = new App() + +//disable this unsupprted path to prevent static file render error +app.use((ctx) => + ctx.url.pathname === '/.well-known/appspecific/com.chrome.devtools.json' + ? new Response(null, { status: 404 }) + : ctx.next() +) + app.use(staticFiles()) //TEMP fix before updating cssBundler middleware