Disable Hono strict mode

This commit is contained in:
Alex Gleason 2024-06-10 20:04:39 -05:00
parent 6b3e01a072
commit 899e7672dc
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 4 additions and 3 deletions

View File

@ -129,7 +129,7 @@ type AppContext = Context<AppEnv>;
type AppMiddleware = MiddlewareHandler<AppEnv>;
type AppController = Handler<AppEnv, any, HonoInput, Response | Promise<Response>>;
const app = new Hono<AppEnv>();
const app = new Hono<AppEnv>({ 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/' });