didierfred / SimpleModifyHeaders

Extension for firefox and chrome to modify headers
164 stars 30 forks source link
chrome extension firefox headers

SimpleModifyHeaders V 1.9.0

This extension, available for Firefox and Chrome, allows you to rewrite headers based on a rules table.

You can easily start and stop the extension using the button on the top right. Remember to click the save button to apply your modifications.

The extension also provides the ability to:

Rules table

The rules table consists of the following parameters:

Url pattern

We can choose the URLs on which the modifications are applied by modifying the URL pattern :

Parameters

The parameters button permits to:

Firefox-specific issue

According to the version of Firefox, the addition of a new header behaves differently. In the latest version, when you choose the "add" action and the header exists, it appends the value, while in the old version, it replaces it. If you want to modify an exiting header, you should use "modify" instead of "add".

It's not possible to define a specific port number in url pattern, https://stackoverflow.com/questions/11425591/match-port-in-chrome-extension-pattern

Chrome / Edge specific issue

The introduction of Manifest V3, mandatory on Chromium-based browsers starting approximately in june 2024, has imposed restrictions on header modifications (refer to Chromium Blog). Direct access to header and custom request filtering are no longer possible. All modifications must now be done via the declarativeNetRequest API, which has its own limitations, including a cap on the number of filtering rules and the size of regular expressions.

Attempting to maintain similar behavior to Manifest V2 presents several challenges, resulting in the following issues:

Extension Permissions

The extension requires the following permissions to function properly:

Firefox

Chrome & Edge

Personal Information

The extension does not collect personal information.

License

The code is Open Source under Mozilla Public License 2.0