Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xi/xiheaders

webextension to modify request headers
https://github.com/xi/xiheaders

webextension

Last synced: about 2 months ago
JSON representation

webextension to modify request headers

Awesome Lists containing this project

README

        

# xiHeaders - modify request headers

This is yet another extension to modify request headers. It stands out by being
extremely simple (~100 lines of code).

## Rules

Rules are defined as a JSON. Each rule has the following properties:

- pattern: the URL pattern this rule applies to. Patterns can include `*` as
a wildcard.
- header: the name of the header
- value: the new value
- action: add|replace|remove [default: replace]

## Examples

Show reddit images instead of redirecting to a HTML page:

```json
{
"pattern": "https://i.redd.it/*",
"header": "Accept",
"value": "image/*"
}
```

A similar rule can also be used for `i.imgur.com`.

## Prior Art

- https://addons.mozilla.org/firefox/addon/header-editor/
- https://addons.mozilla.org/firefox/addon/modify-header-value/
- https://addons.mozilla.org/firefox/addon/simple-modify-header/