mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-07 00:02:06 +08:00
use proxy from query.proxy
This commit is contained in:
8
app.js
8
app.js
@ -23,6 +23,14 @@ app.use(cache("2 minutes", onlyStatus200));
|
||||
|
||||
app.use(express.static(path.resolve(__dirname, "public")));
|
||||
|
||||
app.use(function(req, res, next) {
|
||||
const proxy = req.query.proxy;
|
||||
if (proxy) {
|
||||
req.headers.cookie = req.headers.cookie + `__proxy__${proxy}`;
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
// 获取专辑内容
|
||||
app.use("/album", require("./router/album"));
|
||||
|
||||
|
Reference in New Issue
Block a user