November 27, 2020

How to enable HTTP Authorization header for the API system

Back to Solutions

In some servers, HTTP Authorization header may not be configured by default hence preventing the API system to work correctly. The API system authenticates the user with the token sent via an HTTP Authorization header so if it cannot find any tokens, it will not allow the request to proceed. There is a simple fix to this. In the file .htaccess, find RewriteEngine On and right after this add 

RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

Was this solution helpful?

Related Solutions

7-Day Website

Professional site, live in one week. Built to convert visitors into customers.

Your website. Live in 7 days or less. Starting at $999.

Enterprise Solutions

Complex requirements? We've built platforms handling 10M+ requests daily.

Let's architect something your competitors can't copy.

GemPixel