Skip to content
Joseba Juániz edited this page Sep 10, 2015 · 4 revisions

Authorization Headers Missing

If you are using Apache and you want to use authorization headers for sending login info into the server you will probably see that they are not working at all.

The cause of this problem probably will be that many hosts don't allow by default the use of this header and you'll have to activate it manually.

How to activate Authorization header in Apache

Open your .htaccess file in charge of the Apache configuration of your Yii2 App Directory and add the following code block after the RewriteEngine On statement:

# Authorization Headers
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Clone this wiki locally