Fix: use `X-Cr` as custom header prefix

This commit is contained in:
HFO4 2021-11-23 21:18:31 +08:00
parent e3d3e790f1
commit 691e82868d
4 changed files with 9 additions and 9 deletions

View File

@ -1201,8 +1201,8 @@ function getCookieByString(cookieName) {
multipart: false,
send_file_name: false,
headers: {
"X-Path": encodeURIComponent(file.path),
"X-FileName": encodeURIComponent(
"X-Cr-Path": encodeURIComponent(file.path),
"X-Cr-FileName": encodeURIComponent(
getFileKey(up, file, func)
),
},

View File

@ -1076,8 +1076,8 @@ function getCookieByString(cookieName) {
multipart: false,
send_file_name: false,
headers: {
"X-Path": encodeURIComponent(file.path),
"X-FileName": encodeURIComponent(
"X-Cr-Path": encodeURIComponent(file.path),
"X-Cr-FileName": encodeURIComponent(
getFileKey(up, file, func)
),
},

View File

@ -1155,8 +1155,8 @@ function getCookieByString(cookieName) {
multipart: false,
send_file_name: false,
headers: {
"X-Path": encodeURIComponent(file.path),
"X-FileName": encodeURIComponent(
"X-Cr-Path": encodeURIComponent(file.path),
"X-Cr-FileName": encodeURIComponent(
getFileKey(up, file, func)
),
},

View File

@ -1051,10 +1051,10 @@ function getCookieByString(cookieName) {
multipart: false,
send_file_name: false,
headers: {
"X-Policy": that.putPolicy,
"X-Overwrite": "false",
"X-Cr-Policy": that.putPolicy,
"X-Cr-Overwrite": "false",
Authorization: that.token,
"X-FileName": encodeURIComponent(
"X-Cr-FileName": encodeURIComponent(
getFileKey(up, file, func)
),
},