Skip to content

Commit 4906c79

Browse files
committed
fix: gm_xhr获取重定向后地址
1 parent 85cb130 commit 4906c79

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/apps/grant/background.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export class BackgroundGrant {
372372
protected dealXhr(config: GM_Types.XHRDetails, xhr: XMLHttpRequest): GM_Types.XHRResponse {
373373
let removeXCat = new RegExp("x-cat-" + this.rand + "-", "g");
374374
let respond: GM_Types.XHRResponse = {
375-
finalUrl: config.url,
375+
finalUrl: xhr.responseURL || config.url,
376376
readyState: <any>xhr.readyState,
377377
status: xhr.status,
378378
statusText: xhr.statusText,

0 commit comments

Comments
 (0)