-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Description
在scriptcat中使用如下代码指定headers
GM_xmlhttpRequest({
method: 'GET',
url: 'http://xxxx',
headers: {
referer: "http://microsoft.com",
origin: "http://microsoft.com"
}
发现它会把Origin和Referer请求头变成
X-Cat-20379D59-3753-4Bc2-9Aac-7Fd1601C4454-Origin: http://microsoft.com
X-Cat-20379D59-3753-4Bc2-9Aac-7Fd1601C4454-Referer: http://microsoft.com
而且还莫名多了一个X-Cat-xxx-Scriptcat的出来
X-Cat-20379D59-3753-4Bc2-9Aac-7Fd1601C4454-Scriptcat: true
导致最终请求失败。
而我换成用tampermonkey去验证了一下,发送的请求头则都是标准和正确的值,也没有多余的X-Cat-xxx-Scriptcat出现。
这是为什么,需要如何避免?
Firefox最新版,后台脚本
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels