Can't get the authorization header with PHP-CGI on MAMP

Süha Boncukçu Source

I use CakePHP 3.5.* on MAMP PRO. I've implemented Oauth2 to my app but can't get the Authorization header.

I've already tried adding

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1


RewriteCond %{HTTP:Authorization} ^(.+)$ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

to my .htaccess file but no chance.

I can't get the Authorization header through $request->getHeaders() or php's apache_request_headers() function.

How can I get the Authorization header to use in thephpleague's oauth2-server package?



comments powered by Disqus