Skip to content

Commit

Permalink
修复referer问题,暂时缓解大文件获取不到的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wyndem committed Jan 21, 2024
1 parent d53ba45 commit 6344aa7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_VERSION='2.1.6'
VITE_VERSION='2.1.7'
14 changes: 11 additions & 3 deletions src/page/DwoloadPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ function showSet() {
function IDMPush() {
var content = "", referer = "https://www.aliyundrive.com/", userAgent = navigator.userAgent;
var protocol = window.location.protocol; // 获取协议,例如 'http:'
var host = window.location.host; // 获取主机名,例如 'www.bilibili.com'
var fullHost = protocol + '//' + host+"/";
var content = "", referer = fullHost, userAgent = navigator.userAgent;
fileList.forEach(function (item, index) {
if (item.url != '' && item.url != null) {
content += ["<", item.url, "referer: " + referer, "User-Agent: " + userAgent, ">"].join("\r\n") + "\r\n";
Expand Down Expand Up @@ -178,8 +181,13 @@ function getFileUrl(item, call) {
file_id: item.file_id
}).then((response) => {
item.error = false;
item.text = response.data.url
item.url = response.data.url
if(response.data.url){
item.text = response.data.url
item.url = response.data.url
}else{
item.text =item.url;
}
})
}
Expand Down

0 comments on commit 6344aa7

Please sign in to comment.