Headers
Header Rules add, change, or remove an HTTP header on matching traffic. Use
them to send an Authorization token to a staging API, try a new
Content-Security-Policy before you deploy it, or strip X-Frame-Options so
a page can be embedded while you test.
Chrome applies every rule itself, through its built-in
declarativeNetRequest engine. There is no proxy and nothing runs in the
page.
Creating a rule
- Open the Headers tab in the popup.
- Click + (Add header) and fill in the header Name and Value.
Header names autocomplete as you type, and common values (such as
no-cacheor*) are suggested. - Pick a Target:
- Request changes what the browser sends to the server.
- Response changes what the browser receives, before the page sees it.
- Pick an Action:
- Set replaces the header, or adds it if it's missing.
- Append adds your value to the header's existing value.
- Remove deletes the header. The Value field is not used.
- Click Save Changes.
The On checkbox turns a rule on or off without deleting it, and applies immediately. Use the arrow buttons to move a rule up or down.
Quick Add
The Quick Add menu above the list fills in common headers for you:
- CORS: Allow All adds four response headers:
Access-Control-Allow-Origin: *,Access-Control-Allow-Methods,Access-Control-Allow-Headers: Content-Type, Authorization, andAccess-Control-Allow-Credentials: true. Edit any of them like a normal row. Browsers never accept*for requests sent with cookies, so for those, setAccess-Control-Allow-Originto your page's exact origin. - New CSP Header opens a builder for
Content-Security-Policy: one row per directive, such asscript-srcwith'self' https://cdn.example.com. - New Permissions-Policy Header opens the same builder for
Permissions-Policy, such ascamera=(). - New Cookie Header builds a
Set-CookieorCookievalue with Path, Domain, Max-Age, SameSite, Secure, and HttpOnly. It always overwrites the whole header with that exact value; it cannot merge into a cookie the server sent.
An existing CSP, Permissions-Policy, or cookie row has a Build… link that reopens the builder.
Filters
By default a rule applies to every request on your scoped domains. The
filters button on each row narrows it to certain resource types (for
example only xmlhttprequest, so API calls change but images and scripts
don't) or certain request methods (for example only POST). Leave a
group empty to match everything.
Table and JSON
The Table | JSON toggle shows the whole header list as one JSON array.
Edit it, or paste a list copied from an exported profile, then save. The
editor checks the JSON as you type and names the item that has a problem,
for example Item 2: "name" is required.
[
{ "name": "Authorization", "value": "Bearer dev-token", "target": "request", "operation": "set" },
{ "name": "X-Frame-Options", "target": "response", "operation": "remove" }
]
Scope
Header Rules apply only to the domains in the active profile's Domains list, or to every site when that list is empty, and only after you've granted DevHeader's one-time access permission.
Limits
- Header Rules can't change a request body or cancel a request.
- Changing
Accept-Languagechanges what servers receive, but notnavigator.languageinside the page. - A response-header rule can't change a status code. A CORS preflight that the server answers with an error still fails; use a mock for that endpoint instead.