当尝试通过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.
While the Edge team owns these headers, they're normally added by the browser. It looks like your question isn't so much about the CH-UA header itself, but rather about Windows.Foundation.UniversalApiContract, which our team doesn't own. I think the best way forward here is to contact ...
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...