feat: 网关按域路由——验签拦门、剥伪造内部头、Authorization 原样转发
This commit is contained in:
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user