perf: 增加 MERGE 模式下的信息输出

This commit is contained in:
Aritro37 2025-03-19 16:08:48 +08:00 committed by GitHub
parent 4111b8fabf
commit e6d05fd873
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,9 +40,11 @@ export default function serve() {
'SUB_STORE_FRONTEND_BACKEND_PATH should start with /',
);
}
$.info(
`[BACKEND PREFIX] ${host}:${port}${fe_be_path} -> ${host}:${port}`,
);
if (be_merge) {
$.info(`[BACKEND] MERGE mode is [ON].`);
$.info(`[BACKEND && FRONTEND] ${host}:${port}`);
}
$.info(`[BACKEND PREFIX] ${host}:${port}${fe_be_path}`);
$app.use((req, res, next) => {
if (req.path.startsWith(fe_be_path)) {
req.url = req.url.replace(fe_be_path, '') || '/';