mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-22 03:29:25 +00:00
Compare commits
No commits in common. "7fceec12e42ab53db4a37aaa677fad9a45d3924d" and "2a0b54e442dfb1ddf6a48b6ada37aea74c638992" have entirely different histories.
7fceec12e4
...
2a0b54e442
@ -227,7 +227,6 @@ async function consturctServer(moduleDefs) {
|
|||||||
const moduleResponse = await moduleDef.module(query, (...params) => {
|
const moduleResponse = await moduleDef.module(query, (...params) => {
|
||||||
// 参数注入客户端IP
|
// 参数注入客户端IP
|
||||||
const obj = [...params]
|
const obj = [...params]
|
||||||
// 获取请求中的 IP 参数
|
|
||||||
let ip = req.ip
|
let ip = req.ip
|
||||||
|
|
||||||
if (ip.substring(0, 7) == '::ffff:') {
|
if (ip.substring(0, 7) == '::ffff:') {
|
||||||
@ -237,8 +236,8 @@ async function consturctServer(moduleDefs) {
|
|||||||
ip = global.cnIp
|
ip = global.cnIp
|
||||||
}
|
}
|
||||||
// logger.info('Requested from ip:', ip)
|
// logger.info('Requested from ip:', ip)
|
||||||
obj[2] = {
|
obj[3] = {
|
||||||
...(obj[2] || {}),
|
...obj[3],
|
||||||
ip,
|
ip,
|
||||||
}
|
}
|
||||||
return request(...obj)
|
return request(...obj)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user