KeenKit Headers

How to override response headers in Chrome

Chrome DevTools can override a response header locally. For example, try a different Content-Language value while testing an application that reads response metadata. The origin server keeps returning its original header.

Override a single response in DevTools

  1. Open Network in DevTools and reload the page or repeat the API call. Right-click its request and choose Override headers.
  2. If prompted, choose a local folder for overrides and allow DevTools to use it. Under Headers → Response Headers, edit the header or add one.
  3. Repeat the request and look for the override indicator next to the modified response. Open Sources → Overrides and clear Enable Local Overrides to return to the server’s value.

Chrome disables the cache while Local Overrides are enabled. Chrome’s response override instructions

Keep a reusable response header profile

KeenKit Headers is available from the Chrome Web Store and Microsoft Edge Add-ons. Add to Chrome Get it for Edge

  1. In the KeenKit Headers editor, limit the destination to your staging HTTPS origin, or use a URL filter if the change should apply only to a particular endpoint.
  2. In Response headers, choose Set and enter the header name and value. Include page loads for a document or Fetch and XHR for an API call. Select Apply and review site access.
  3. Disable any DevTools override for the same request, run the test, and confirm the value under Response Headers. Pause the profile when you finish.

Chrome applies the rules with the access you grant. KeenKit Headers stores profiles on your device and reads no page content.

The source code is public under the MIT license: github.com/keenkit/headers. Headers privacy policy