mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
修复代码错误
This commit is contained in:
parent
4f7266e4a5
commit
3b15fe9024
5
app.js
5
app.js
@ -38,9 +38,8 @@ app.use((req, res, next) => {
|
|||||||
|
|
||||||
// cookie parser
|
// cookie parser
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
req.cookies = {}(req.headers.cookie || '')
|
req.cookies = {}
|
||||||
.split(/\s*;\s*/)
|
;(req.headers.cookie || '').split(/\s*;\s*/).forEach((pair) => {
|
||||||
.forEach((pair) => {
|
|
||||||
let crack = pair.indexOf('=')
|
let crack = pair.indexOf('=')
|
||||||
if (crack < 1 || crack == pair.length - 1) return
|
if (crack < 1 || crack == pair.length - 1) return
|
||||||
req.cookies[
|
req.cookies[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user