mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 06:03: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/)
|
- [在线文档](https://neteasecloudmusicapienhanced.js.org/)
|
||||||
- [NPM 包地址](https://www.npmjs.com/package/@neteaseapireborn/api)
|
- [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
|
const appExt = app
|
||||||
appExt.server = app.listen(port, host, () => {
|
appExt.server = app.listen(port, host, () => {
|
||||||
console.log(`
|
console.log(`
|
||||||
_ _ _____ __ __ _ ____ ___
|
_ _ _____ __ __
|
||||||
| \\ | |/ ____| \\/ | /\\ | | | _ \\_ |
|
| \\ | |/ ____| \\/ |
|
||||||
| \\| | | | \\ / | / \\ | | | |_) | |
|
| \\| | | | \\ / |
|
||||||
| . \` | | | |\\/| | / /\\ \\ | | | __/| |
|
| . \` | | | |\\/| |
|
||||||
| |\\ | |____| | | | / ____ \\| |__| | | |
|
| |\\ | |____| | | |
|
||||||
|_| \\_|\\_____|_| |_| /_/ \\_\\____|_| |_|
|
|_| \\_|\\_____|_| |_|
|
||||||
`)
|
`)
|
||||||
console.log(`
|
console.log(`
|
||||||
╔═╗╔═╗╦ ╔═╗╔╗╔╦ ╦╔═╗╔╗╔╔═╗╔═╗╔╦╗
|
╔═╗╔═╗╦ ╔═╗╔╗╔╦ ╦╔═╗╔╗╔╔═╗╔═╗╔╦╗
|
||||||
╠═╣╠═╝║ ║╣ ║║║╠═╣╠═╣║║║║ ║╣ ║║
|
╠═╣╠═╝║ ║╣ ║║║╠═╣╠═╣║║║║ ║╣ ║║
|
||||||
╩ ╩╩ ╩═╝ ╚═╝╝╚╝╩ ╩╩ ╩╝╚╝╚═╝╚═╝═╩╝
|
╩ ╩╩ ╩ ╚═╝╝╚╝╩ ╩╩ ╩╝╚╝╚═╝╚═╝═╩╝
|
||||||
`)
|
`)
|
||||||
logger.info(`
|
logger.info(`
|
||||||
- Server started successfully @ http://${host ? host : 'localhost'}:${port}
|
- Server started successfully @ http://${host ? host : 'localhost'}:${port}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"target": "ES2015",
|
"target": "ES2015",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
|
"ignoreDeprecations": "6.0",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"lib": [
|
"lib": [
|
||||||
"esnext",
|
"esnext",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const createOption = (query, crypto = '') => {
|
const createOption = (query, crypto = '') => {
|
||||||
return {
|
return {
|
||||||
crypto: query.crypto || crypto || '',
|
crypto: query.crypto || crypto || '',
|
||||||
cookie: query.cookie,
|
cookie: query.cookie || process.env.NETEASE_COOKIE,
|
||||||
ua: query.ua || '',
|
ua: query.ua || '',
|
||||||
proxy: query.proxy,
|
proxy: query.proxy,
|
||||||
realIP: query.realIP,
|
realIP: query.realIP,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user