mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-08-12 17:10:37 +00:00
20 lines
639 B
JavaScript
20 lines
639 B
JavaScript
const createOption = (query, crypto = '', checkToken = false) => {
|
|
return {
|
|
crypto: query.crypto || crypto || '',
|
|
cookie: query.cookie || process.env.NETEASE_COOKIE,
|
|
ua: query.ua || '',
|
|
proxy: query.proxy,
|
|
realIP: query.realIP,
|
|
randomCNIP:
|
|
process.env.ENABLE_RANDOM_CN_IP === 'true'
|
|
? !['false', false].includes(query.randomCNIP)
|
|
: ['true', true].includes(query.randomCNIP),
|
|
e_r: query.e_r || undefined,
|
|
domain: query.domain || '',
|
|
checkToken: query.checkToken || checkToken,
|
|
headers: query.headers || {},
|
|
timeout: query.timeout || 0,
|
|
}
|
|
}
|
|
module.exports = createOption
|