fix(server): 修复 serve-static 不接受数组 root、改为按请求逐个挂载,避免启动时 TypeError: root path must be a string
上一轮把 getBeepAudioDirs() 这个数组直接塞进 express.static(),
但 serve-static 签名要求 root 必须是字符串,会在 app 启动注册
中间件时直接抛错(甚至在接收请求前)。
修复方式:
- /media/audio/general 和 /media/audio/beep 改为动态中间件:
请求进来时再依次对每个目录调用一次 express.static(root, {fallthrough})
- 单目录的 music/voice/line/station/temp 保留 express.static
但统一包一层 String(xxx || '') 保证就算路径解析异常也是空
字符串而不是 undefined
- 后备的 7 条 app.get(':path(*)') 路由不变,仍然负责 sendBinaryFile /
sendBinaryFileFromCandidates 兜底(含 range、Content-Length 等头)
客户端 bump v1.0.102 -> v1.0.103
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
-- 1. Configuration & Constants
|
||||
local APP_VERSION_TEXT = "v1.0.102"
|
||||
local APP_VERSION_TEXT = "v1.0.103"
|
||||
|
||||
local CONFIG = {
|
||||
CLOUD_URL = "ws://stabadmin.fse-media.group",
|
||||
|
||||
Reference in New Issue
Block a user