mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
服务启动刷新游客cookie
This commit is contained in:
+2
-2
@@ -43,7 +43,7 @@ const chooseUserAgent = (ua = false) => {
|
||||
? realUserAgentList[Math.floor(Math.random() * realUserAgentList.length)]
|
||||
: ua
|
||||
}
|
||||
const createRequest = (method, url, data, options) => {
|
||||
const createRequest = (method, url, data = {}, options) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let headers = { 'User-Agent': chooseUserAgent(options.ua) }
|
||||
if (method.toUpperCase() === 'POST')
|
||||
@@ -54,7 +54,7 @@ const createRequest = (method, url, data, options) => {
|
||||
// headers['X-Real-IP'] = '118.88.88.88'
|
||||
if (typeof options.cookie === 'object') {
|
||||
if (!options.cookie.MUSIC_U) {
|
||||
// 匿名
|
||||
// 游客
|
||||
if (!options.cookie.MUSIC_A) {
|
||||
options.cookie.MUSIC_A = config.anonymous_token
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user