November 27, 2020

How to enable HTTP Authorization header for the API system

Back à 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 ce solution helpful?

Related Solutions

Site web en 7 jours

Site professionnel, en ligne en une semaine. Conçu pour convertir les visiteurs en clients.

Votre site web. En ligne en 7 jours ou moins. À partir de $999.

Solutions entreprise

Besoins complexes ? Nous avons construit des plateformes gérant plus de 10 M de requêtes par jour.

Construisons quelque chose que vos concurrents ne pourront pas copier.

GemPixel