From 32f16f80bf43857831a317616ad09bbff4038eb5 Mon Sep 17 00:00:00 2001 From: GuanyuTao Date: Wed, 21 Aug 2024 22:35:59 +0100 Subject: [PATCH] fix: AE proxy request path --- packages/itmat-interface/src/server/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/itmat-interface/src/server/router.ts b/packages/itmat-interface/src/server/router.ts index eeb22deec..6944c922d 100644 --- a/packages/itmat-interface/src/server/router.ts +++ b/packages/itmat-interface/src/server/router.ts @@ -219,11 +219,11 @@ export class Router { target: _this.config.aeEndpoint, ws: true, xfwd: true, - // logLevel: 'debug', autoRewrite: true, changeOrigin: true, on: { proxyReq: function (preq, req: Request, res: Response) { + preq.path = req.baseUrl + req.path; if (!req.user) return res.status(403).redirect('/'); res.cookie('ae_proxy', req.headers['host']);