mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 16:28:57 +08:00
Fixed UA not working
This commit is contained in:
parent
52fe634b60
commit
bd58aaa2a4
@ -2,15 +2,16 @@ const { HTTP } = require('./open-api');
|
||||
|
||||
const cache = new Map();
|
||||
|
||||
async function download(url, userAgent = 'Quantumult%20X') {
|
||||
const id = userAgent + url;
|
||||
async function download(url, ua) {
|
||||
ua = ua || 'Quantumult%20X/1.0.29 (iPhone14,5; iOS 15.4.1)';
|
||||
const id = ua + url;
|
||||
if (cache.has(id)) {
|
||||
return cache.get(id);
|
||||
}
|
||||
|
||||
const $http = HTTP({
|
||||
headers: {
|
||||
'User-Agent': userAgent
|
||||
'User-Agent': ua
|
||||
}
|
||||
});
|
||||
|
||||
|
2
backend/sub-store.min.js
vendored
2
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user