mirror of
https://github.com/lyz05/danmaku.git
synced 2026-02-03 02:04:38 +08:00
fix: 修复subconverter获取不到node的问题
This commit is contained in:
@@ -57,8 +57,14 @@ router.get("/", async function (req, res) {
|
||||
const subinfo = database.suburl[req.query.ctype];
|
||||
//返回指定订阅信息
|
||||
if (subinfo) {
|
||||
const url = await oss.signurl("SUB/" + req.query.ctype, true);
|
||||
res.redirect(url);
|
||||
// 判断是否要生成加速链接,是否为订阅转换
|
||||
if (!req.headers['subconverter-request']) {
|
||||
const url = await oss.signurl("SUB/" + req.query.ctype, true);
|
||||
res.redirect(url);
|
||||
} else {
|
||||
const ret = await oss.get("SUB/" + req.query.ctype);
|
||||
res.type("text/plain").end(ret);
|
||||
}
|
||||
} else {
|
||||
res.status(404).send("Not Found 找不到这种订阅类型");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user