mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 22:53:09 +00:00
Update server.js
This commit is contained in:
parent
6ae1964685
commit
f35c198c4e
@ -147,8 +147,7 @@ async function consturctServer(moduleDefs) {
|
||||
if (req.path !== '/' && !req.path.includes('.')) {
|
||||
res.set({
|
||||
'Access-Control-Allow-Credentials': true,
|
||||
'Access-Control-Allow-Origin':
|
||||
CORS_ALLOW_ORIGIN || req.headers.origin || '*',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': 'X-Requested-With,Content-Type',
|
||||
'Access-Control-Allow-Methods': 'PUT,POST,GET,DELETE,OPTIONS',
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
@ -242,7 +241,7 @@ async function consturctServer(moduleDefs) {
|
||||
|
||||
if (req.baseUrl === '/song/url/v1' || req.baseUrl === '/song/url') {
|
||||
const song = moduleResponse['body']['data'][0]
|
||||
if (song.freeTrialInfo !== null || !song.url || [1, 4].includes(song.fee)) {
|
||||
if ( 1===1 || (song.freeTrialInfo !== null || !song.url || [1, 4].includes(song.fee))) {
|
||||
const match = require('@unblockneteasemusic/server')
|
||||
const source = ['pyncmd', 'kuwo', 'youtube']
|
||||
const { url } = await match(req.query.id, source)
|
||||
|
Loading…
x
Reference in New Issue
Block a user