In Micro Framework.
curl -i -X GET -H "AUTHORIZATION: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJleHAiOjE0MTUyODg0NzgsImxhc3QiOjEzNTY5OTk1MjR9.-xysOSRcj5hgG1iMVfZWHuz39dEpvod0O5ry3EiBstg" http://localhost/contract/dist/api/v1/cue
When call $app->request->getHeader("AUTHORIZATION"); get null.
curl -i -X GET -H "AUTHORIZATIO: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJleHAiOjE0MTUyODg0NzgsImxhc3QiOjEzNTY5OTk1MjR9.-xysOSRcj5hgG1iMVfZWHuz39dEpvod0O5ry3EiBstg" http://localhost/contract/dist/api/v1/cue
But $app->request->getHeader("AUTHORIZATIO"); can get value. How to fix it.
It's Apache problem. I'm fix by add
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
near top of .htaccess
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With