Skip to main content

Custom request headers

You can set up your pages so that a custom request header is sent with every request that's made while loading the page.

Here are some example use cases:

  • to prevent the DebugBear agent from being blocked by your server
  • to exclude DebugBear requests from analytics
  • to load pages behind HTTP Basic Auth

How to set up a custom request header

  1. Go to your page settings or create a new pages
  2. Open Advanced Settings
  3. Open HTTP Headers
  4. Click Add HTTP Header
  5. Click Create HTTP Header

Advanced test settings

  1. Pick a name for the setting
  2. Fill in the header name and value
  3. Click Create

HTTP header form

Using the API

You can customize the headers that are passed with a test that's triggered via the API:

debugbear.pages.analyze(pageId, {
customHeaders: {
"X-Origin": "DebugBear",

Using the CLI

Use the --customHeader flag to trigger a test with an additional header:

debugbear --pageId 1234 --customHeader "X-Origin:DebugBear" --customHeader "Another:Header"