2016-05-25 219 views
1

如何禁用chrome擴展中的反ddos限制?它目前只能通過在擴展快捷方式中設置標誌--disable-extensions-http-throttling 來工作,但當擴展在許多客戶端上運行時(我需要在任何客戶端上手動設置),這是不可接受的。禁用chrome http請求限制擴展

我試圖在background.js腳本來禁用它,但它不工作:

chrome.webRequest.onHeadersReceived.addListener(
    function(info) { 
     var headers = info.responseHeaders; 
     var throttleHeader = {name: 'X-Chrome-Exponential-Throttling', 
      value: 'disable'}; 
     headers.push(throttleHeader); 
     return {responseHeaders: headers}; 
    }, 
    { 
     urls: ['*://*/*'], // Pattern to match all http(s) pages 
     types: ['sub_frame', 'xmlhttprequest'] 
    }, 
    ['blocking', 'responseHeaders'] 
); 

還有沒有其他的方法來禁用節流的延伸?我正在使用最新版本的Chrome(50.0.2661.102米)

回答