mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-21 20:14:07 +08:00
16 lines
414 B
JavaScript
16 lines
414 B
JavaScript
import { HTTP } from '@/vendor/open-api';
|
|
|
|
export async function getFlowHeaders(url) {
|
|
const http = HTTP();
|
|
const { headers } = await http.get({
|
|
url,
|
|
headers: {
|
|
'User-Agent': 'Quantumult%20X/1.0.30 (iPhone14,2; iOS 15.6)',
|
|
},
|
|
});
|
|
const subkey = Object.keys(headers).filter((k) =>
|
|
/SUBSCRIPTION-USERINFO/i.test(k),
|
|
)[0];
|
|
return headers[subkey];
|
|
}
|