mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
deal with csrf token
This commit is contained in:
parent
d258e900b1
commit
a737e1f2f2
@ -40,6 +40,9 @@ function createWebAPIRequest(
|
||||
errorcallback
|
||||
) {
|
||||
// console.log(cookie);
|
||||
if (cookie.match(/_csrf=[^(;|$)]+;/g))
|
||||
data.csrf_token = cookie.match(/_csrf=[^(;|$)]+/g)[0].slice(6);
|
||||
else data.csrf_token = "";
|
||||
const proxy = cookie.split("__proxy__")[1];
|
||||
cookie = cookie.split("__proxy__")[0];
|
||||
const cryptoreq = Encrypt(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user