简体   繁体   English

如何使用野生动物园扩展名修改请求标头

[英]How modify the request headers using safari extension

I am developing a safari extension which will modify the http request headers. 我正在开发一个safari扩展程序,它将修改http请求标头。 I am able to modify the request headers in chrome and firefox extensions but not in safari extension. 我可以在chrome和firefox扩展名中修改请求标头,但不能在safari扩展名中修改。 In chrome there is webRequest API to modify the request header. 在chrome中,有webRequest API可以修改请求标头。 chrome.webRequest.onHeadersReceived.addListener(function (details)); chrome.webRequest.onHeadersReceived.addListener(function(details));

In firefox by using the "http-on-examine-response" http Request Observer Any help or clues are mostly appreciated 在firefox中,通过使用“ http-on-examine-response” http请求观察者,可以对任何帮助或提示大加赞赏

Unfortunately there is no way for you to do that with Safari. 不幸的是,您无法通过Safari做到这一点。 You can however inject content scripts and listen to HTML events and block your pages or use the beforeNavigate events. 但是,您可以注入内容脚本并侦听HTML事件并阻止页面或使用beforeNavigate事件。 Safari's extension API is pretty limited with what you can and cannot do. Safari的扩展API在可以做什么和不能做什么方面受到很大的限制。 Sorry :(. 对不起:(。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM