mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-21 21:43:09 +00:00
feat: 支持全局cookie代理
This commit is contained in:
parent
765734cd2d
commit
0e0777d175
@ -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)
|
||||
|
||||
## 常见部署方式
|
||||
|
||||
|
14
server.js
14
server.js
@ -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}
|
||||
|
@ -3,6 +3,7 @@
|
||||
"target": "ES2015",
|
||||
"module": "commonjs",
|
||||
"experimentalDecorators": true,
|
||||
"ignoreDeprecations": "6.0",
|
||||
"moduleResolution": "node",
|
||||
"lib": [
|
||||
"esnext",
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user