feat: 支持全局cookie代理

This commit is contained in:
ImFurina 2025-10-06 14:07:33 +08:00
parent 765734cd2d
commit 0e0777d175
4 changed files with 10 additions and 9 deletions

View File

@ -41,7 +41,7 @@ set PORT=4000 && node app.js # Windows
- [在线文档](https://neteasecloudmusicapienhanced.js.org/)
- [NPM 包地址](https://www.npmjs.com/package/@neteaseapireborn/api)
- [Dockerhub 主页](https://hub.docker.com/repository/docker/moefurina/ncm-api/)
- [Dockerhub 主页](https://hub.docker.com/r/moefurina/ncm-api)
## 常见部署方式

View File

@ -336,17 +336,17 @@ async function serveNcmApi(options) {
const appExt = app
appExt.server = app.listen(port, host, () => {
console.log(`
_ _ _____ __ __ _ ____ ___
| \\ | |/ ____| \\/ | /\\ | | | _ \\_ |
| \\| | | | \\ / | / \\ | | | |_) | |
| . \` | | | |\\/| | / /\\ \\ | | | __/| |
| |\\ | |____| | | | / ____ \\| |__| | | |
|_| \\_|\\_____|_| |_| /_/ \\_\\____|_| |_|
_ _ _____ __ __
| \\ | |/ ____| \\/ |
| \\| | | | \\ / |
| . \` | | | |\\/| |
| |\\ | |____| | | |
|_| \\_|\\_____|_| |_|
`)
console.log(`
`)
logger.info(`
- Server started successfully @ http://${host ? host : 'localhost'}:${port}

View File

@ -3,6 +3,7 @@
"target": "ES2015",
"module": "commonjs",
"experimentalDecorators": true,
"ignoreDeprecations": "6.0",
"moduleResolution": "node",
"lib": [
"esnext",

View File

@ -1,7 +1,7 @@
const createOption = (query, crypto = '') => {
return {
crypto: query.crypto || crypto || '',
cookie: query.cookie,
cookie: query.cookie || process.env.NETEASE_COOKIE,
ua: query.ua || '',
proxy: query.proxy,
realIP: query.realIP,