Skip to content

Commit

Permalink
feat: 支持解析订阅中的 profile-web-page-url 字段
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Nov 16, 2024
1 parent 4790bf4 commit 1ad2345
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.418",
"version": "2.14.419",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion backend/src/utils/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ export function getFlowField(headers) {
const subkey = Object.keys(headers).filter((k) =>
/SUBSCRIPTION-USERINFO/i.test(k),
)[0];
return headers[subkey];
const webPageKey = Object.keys(headers).filter((k) =>
/PROFILE-WEB-PAGE-URL/i.test(k),
)[0];
return `${headers[subkey] || ''}${
webPageKey ? `;app_url=${headers[webPageKey]}` : ''
}`;
}
export async function getFlowHeaders(
rawUrl,
Expand Down

0 comments on commit 1ad2345

Please sign in to comment.