mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 09:39:02 +08:00
feat: 支持解析订阅中的 profile-web-page-url
字段
This commit is contained in:
parent
4790bf47d1
commit
cfb5a8e082
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.418",
|
"version": "2.14.419",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -5,10 +5,21 @@ import $ from '@/core/app';
|
|||||||
import headersResourceCache from '@/utils/headers-resource-cache';
|
import headersResourceCache from '@/utils/headers-resource-cache';
|
||||||
|
|
||||||
export function getFlowField(headers) {
|
export function getFlowField(headers) {
|
||||||
const subkey = Object.keys(headers).filter((k) =>
|
let subKey = '';
|
||||||
/SUBSCRIPTION-USERINFO/i.test(k),
|
let webPageKey = '';
|
||||||
)[0];
|
|
||||||
return headers[subkey];
|
Object.keys(headers).some((k) => {
|
||||||
|
if (/SUBSCRIPTION-USERINFO/i.test(k)) {
|
||||||
|
subKey = k;
|
||||||
|
} else if (/PROFILE-WEB-PAGE-URL/i.test(k)) {
|
||||||
|
webPageKey = k;
|
||||||
|
}
|
||||||
|
return subKey && webPageKey;
|
||||||
|
});
|
||||||
|
|
||||||
|
return `${headers[subKey] || ''}${
|
||||||
|
webPageKey ? `;app_url=${headers[webPageKey]}` : ''
|
||||||
|
}`;
|
||||||
}
|
}
|
||||||
export async function getFlowHeaders(
|
export async function getFlowHeaders(
|
||||||
rawUrl,
|
rawUrl,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user