feat: realIP option

This commit is contained in:
a632079
2020-08-05 02:07:37 +08:00
parent 31d7e3941e
commit 9bd30a0ffb
178 changed files with 1734 additions and 906 deletions
+2
View File
@@ -39,6 +39,8 @@ const createRequest = (method, url, data, options) => {
headers['Content-Type'] = 'application/x-www-form-urlencoded'
if (url.includes('music.163.com'))
headers['Referer'] = 'https://music.163.com'
if (options.realIP)
headers['X-Real-IP'] = options.realIP
// headers['X-Real-IP'] = '118.88.88.88'
if (typeof options.cookie === 'object')
headers['Cookie'] = Object.keys(options.cookie)