Skip to main content

Custom request headers

You can set up your project 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 project dashboard
  2. Click the Edit button in the top right corner of the page
  3. Click Show advanced
  4. Fill in the custom header details

Form for adding custom request headers to DebugBear requests

Using the API

You can customize the headers that are passed with each API analysis:

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

Using the CLI

Use the --customHeader flag:

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