Back
July 31, 2023
Learning Centre
6
min read

How to add the authorization header to every request in Chrome, Firefox, and Safari?

Arnab Chatterjee
Content Writer
On this page

Before moving forward on how to add authorization headers lets first understand what are those headers. Authorization headers are HTTP headers that carry authentication credentials or tokens to authorize and validate requests. They provide a way to prove that the requester has the necessary permissions to access protected resources.

There are three types of Authorization headers:

  • Bearer Token
  • Digest Access Authentication
  • AWS Authentication

Requestly is a robust platform that allows you to modify network requests made by your browser. With Requestly, you can easily add custom headers, such as authorization headers, to your requests. Here's a step-by-step guide on how to configure Requestly to add an authorization header.

Step-by-Step Guide for Configuring Modify Header Rule

  1. Install the Requestly extension.
  2. Go to Requestly Rule Selector, select Modify Headers option, and select create rule.
  3. Give your rule a name that describes its purpose, such as "Add Authorization Header"‍.
  4. Enter the Request URL for which you want to modify the HTTP request headers. You can also leave this empty; it will apply the modification to all the URLs in your browser
  5. In the "Request Header" section.Set the following parameters:
  • Header Name: Enter the name of the authorization header (e.g., "Authorization").
  • Header Value: Provide the value for the authorization header (e.g., "Bearer YOUR_TOKEN").

💡 You can add multiple rows if you need to configure additional headers or URL filters.

8. Once you have configured the rule, click on the "Save" button. Requestly will now apply the rule to the matching requests. Test the rule by visiting a URL that matches the configured URL filter.

Benefits of Using Requestly for Authorization Headers

Using Requestly to add authorization headers offers several benefits, including:

  • Easy configuration without modifying application code.
  • Flexibility to add custom headers to specific requests or domains.
  • Quick testing and debugging of authorization-related functionalities.

Happy debugging!

Requestly is an Open-Source frontend development platform with essential tooling & integrations that helps frontend developers write, test & debug their code 10x faster. Using Requestly, you can create mock API endpoints, test, validate & override API responses, modify request & response headers, setup redirects (Map local, Map remote) and use Requestly sessions for faster debugging.

SHARE THIS POST

Ready to get started?

Empowering frontend developers to achieve more in development, testing & debugging workflows.