requestcontrol
requestcontrol copied to clipboard
Add support for webRequest freeze
Currently it is only possible to block request but not possible to timeout a request.
A timeout is needed if a broken website or application re-tries until it succeeds. But if it is blocked it will never succeed and therefore will create endless requests which results in memory leaks and freezing firefox.
Example:
browser.webRequest.onBeforeRequest.addListener(async request => {
console.log('incoming request', request);
await new Promise(() => {});
}, {urls: ['https://www.domain.com/*']}, ['blocking']);
Should there be a time limit after the frozen request times out?
This would may be useful, otherwise there will/can be a memory leak. If possible I would like to have the timeout time limit configureable.