From 899e7672dc9ca4ddeb8549d28df57ca128181988 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 10 Jun 2024 20:04:39 -0500 Subject: [PATCH] Disable Hono strict mode --- src/app.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index 074359d..15d4fc5 100644 --- a/src/app.ts +++ b/src/app.ts @@ -129,7 +129,7 @@ type AppContext = Context; type AppMiddleware = MiddlewareHandler; type AppController = Handler>; -const app = new Hono(); +const app = new Hono({ strict: false }); const debug = Debug('ditto:http'); @@ -141,14 +141,12 @@ if (Conf.cronEnabled) { } app.use('/api/*', logger(debug)); -app.use('/relay/*', logger(debug)); app.use('/.well-known/*', logger(debug)); app.use('/users/*', logger(debug)); app.use('/nodeinfo/*', logger(debug)); app.use('/oauth/*', logger(debug)); app.get('/api/v1/streaming', streamingController); -app.get('/api/v1/streaming/', streamingController); app.get('/relay', relayController); app.use( @@ -297,6 +295,9 @@ app.get('/api/v1/conversations', emptyArrayController); app.get('/api/v1/lists', emptyArrayController); app.use('/api/*', notImplementedController); +app.use('/.well-known/*', notImplementedController); +app.use('/nodeinfo/*', notImplementedController); +app.use('/oauth/*', notImplementedController); const publicFiles = serveStatic({ root: './public/' }); const staticFiles = serveStatic({ root: './static/' });