当尝试通过JavaScript代码(如使用 XMLHttpRequest 或Fetch API)手动设置这些不安全的头时,浏览器会拒绝该请求,并抛出错误消息,如“refused to set unsafe header 'sec-ch-ua'”。 3. 提供解决方案或建议以处理“refused to set unsafe header 'sec-ch-ua'”的错误 要处理这个错误,你通常不需要手动设置 sec-ch...
header中:sec-ch-ua开头的参数。一定注意,并不是所有网站,所有请求都响应这个头,你们改写即可。如果没有,不主动添加。
In header:Parameters starting with sec-ch-ua.It must be noted that not all requests of all the websites respond to this header, you can rewrite it. If not, do not intentionally add.
If i do this: ua = UserAgent() random_ua = ua.random How can I get appart from the user-agent; the sec-ch-ua-platform, the sec-ch-ua and the sec-ch-ua-mobile corresponding to the user-agent you obtain in order to build the correct header...
Then the browser will send the `Sec-CH-UA-Full-Version-List` header on all requests for that site until the browser is closed. ⬆️ _Subsequent requests_ ```text Sec-CH-UA-Full-Version: "93.0.4577.63" Sec-CH-UA-Full-Version-List: " Not A;Brand";v="99.0.0.0", "Chromium";v=...