fix(server): 改用 Express 5 + path-to-regexp v7 兼容的通配写法,避免路由启动崩溃
Express 5 内置的 path-to-regexp v7 不再支持裸 '*',也不支持 自定义正则 '.*'(会报 Missing parameter name)。Express 5 官方兼容的单段全通写是 ':name(*)',并且路由注册会在 app 启动 第一时间完成(出错会直接崩)。 同时为了兼容旧 URL 行为,保留 express.static 前置挂载 + 显式 app.get 后备两条路径,因为 Audio 模块可能需要带 Cache-Control / Range / Content-Type 等头的 custom sendBinaryFile 处理(例如 station 动态裁剪音频),所以不能直接用 static 替代。 修复 7 条路由: /media/audio/general/:path(*) /media/audio/beep/:path(*) /media/audio/music/:path(*) /media/audio/voice/:path(*) /media/audio/line/:path(*) /media/audio/station/:path(*) /media/temp/:path(*) 参数解码加 decodeURIComponent(),兼容中文/空格文件名。 客户端 bump v1.0.101 -> v1.0.102
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
-- 1. Configuration & Constants
|
||||
local APP_VERSION_TEXT = "v1.0.101"
|
||||
local APP_VERSION_TEXT = "v1.0.102"
|
||||
|
||||
local CONFIG = {
|
||||
CLOUD_URL = "ws://stabadmin.fse-media.group",
|
||||
|
||||
Reference in New Issue
Block a user