Skip to main content

Command Palette

Search for a command to run...

PHP: 'Authorization' header sent with request, but missing from apache_request_headers()

Published
1 min read
M

Mohamad's interest is in Programming (Mobile, Web, Database and Machine Learning). He is studying at the Center For Artificial Intelligence Technology (CAIT), Universiti Kebangsaan Malaysia (UKM).

Possible explanation: The Authorization header was stripped away by Apache server. Try adding the following lines in .htaccess:

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
6 views
PHP: 'Authorization' header sent with request, but missing from apache_request_headers()