fix 打开 ota 授权
Docker Build and Push / build-image (push) Successful in 2m51s

This commit is contained in:
cheney
2026-08-07 16:24:10 +08:00
parent a5bc8ef1f1
commit 22a36fb213
5 changed files with 671 additions and 19 deletions
+3 -1
View File
@@ -25,11 +25,13 @@ app.get('/api/health', (_req, res) => res.json({ ok: true, ts: Date.now() }))
// 业务路由
app.use('/api/auth', authRouter)
// OTA 接口是公开的 (检查/下载更新不需要登录), 必须挂载在带 authRequired 的 router 之前,
// 否则 /api/ota/* 请求会先进入 dataRouter 等并被 authRequired 以 401 拦截
app.use('/api', otaRouter)
app.use('/api', dataRouter)
app.use('/api', newsRouter)
app.use('/api', alertsRouter)
app.use('/api', articlesRouter)
app.use('/api', otaRouter)
app.use('/api', apizeroRouter)
app.use('/api', monitorsRouter)