feat: 网关按域路由——验签拦门、剥伪造内部头、Authorization 原样转发

This commit is contained in:
lovefyf
2026-08-13 05:04:10 +08:00
parent 6beb663cf0
commit af1c1a8eb4
4 changed files with 151 additions and 1 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
import { Hono } from 'hono';
import { healthRoute, registerHealthCheck } from './health';
import { checkNats } from '../shared/bus/nats';
import { proxyRoutes } from '../modules/proxy/routes';
export function buildApp(): Hono {
registerHealthCheck('nats', checkNats);
const app = new Hono();
app.route('/health', healthRoute());
app.route('/health', healthRoute()); // 公开:不过 requireAuth
app.route('/api', proxyRoutes());
return app;
}