Published - 5 years ago ( Updated - 5 years ago )
Apache removed the Authorization Header, and there is no solution in $_SERVER.
You can try to add the following content in .htaccess, and it will be normal.
You can try to add the following content in .htaccess, and it will be normal.
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
In this way, you can use pure PHP to get the token in the header of the request.
<?php
echo $_SERVER['HTTP_AUTHORIZATION'];
No Comment
Post your comment