Files
Oliver Dunk 45d8850c1a Add declarativeNetRequest API samples. (#839)
* Add declarativeNetRequest API samples.

Adds a number of samples for the declarativeNetRequest API.
2023-03-03 15:53:50 +00:00
..

chrome.declarativeNetRequest - No Cookies

This sample demonstrates using the chrome.declarativeNetRequest API to remove the "Cookie" header from requests.

Overview

Once this extension is installed, any main frame requests ending in ?no-cookies=1 will be sent without the "Cookie" header.

For example, install this extension and try navigating to https://github.com/GoogleChrome/chrome-extensions-samples?no-cookies=1. You should appear signed out.

Implementation Notes

This sample uses the chrome.declarativeNetRequest.onRuleMatchedDebug event which is only available in unpacked extensions.