From c692d0c19df77a9a63ae0cf3ea4e65ae19392c3b Mon Sep 17 00:00:00 2001 From: xiongxiao Date: Fri, 26 Dec 2025 19:22:18 +0800 Subject: [PATCH] update --- src/app.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app.ts b/src/app.ts index be35b86..82f7d1e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -9,9 +9,18 @@ import * as schema from './db/schema.ts'; export const config = useConfig() export const app = useConfigKey('app', () => new App({ - + serverOptions: { + cors: { + origin: '*', + } + } })) -app.router.createRouteList(); +app.route({ + path: 'router', + key: 'list' +}).define(async (ctx) => { + ctx.body = app.router.getList(); +}).addTo(app); export const db = useConfigKey('db', () => { const sqlite = new Database(config.DATABASE_URL || 'storage/browser-helper/data.sqlite3');