Knowledge Base

Premium URL Shortener

How to enable HTTP Authorization header for the API system

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 helpful? 😃 😞

Still have questions?

If you still have questions, feel free to open a ticket and we will gladly help you out!

Open a ticket