mirror of
https://github.com/qist/tvbox.git
synced 2025-10-26 09:42:24 +00:00
Add files via upload
This commit is contained in:
12
lib/drpy2.js
12
lib/drpy2.js
@@ -2045,6 +2045,18 @@ function init(ext) {
|
||||
if(['MOBILE_UA','PC_UA','UC_UA','IOS_UA','UA'].includes(v)){
|
||||
rule.headers[k] = eval(v);
|
||||
}
|
||||
}else if(k.toLowerCase() === 'cookie'){
|
||||
let v = rule.headers[k];
|
||||
if(v && v.startsWith('http')){
|
||||
console.log(v);
|
||||
try {
|
||||
v = fetch(v);
|
||||
console.log(v);
|
||||
rule.headers[k] = v;
|
||||
}catch (e) {
|
||||
console.log(`从${v}获取cookie发生错误:`+e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user