We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Can't get header AUTHORIZATION but change to AUTHORIZATIO can get value.

curl -i -X GET -H "AUTHORIZATION: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJleHAiOjE0MTUyODg0NzgsImxhc3QiOjEzNTY5OTk1MjR9.-xysOSRcj5hgG1iMVfZWHuz39dEpvod0O5ry3EiBstg" https://localhost/contract/dist/api/v1/cue

When call $app->request->getHeader("AUTHORIZATION"); get null.

curl -i -X GET -H "AUTHORIZATIO: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJleHAiOjE0MTUyODg0NzgsImxhc3QiOjEzNTY5OTk1MjR9.-xysOSRcj5hgG1iMVfZWHuz39dEpvod0O5ry3EiBstg" https://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

Thanks Eakkapat Pattarathamr, it works for me

it works for me too ... but can u explain what is that codes means? afraid of conflict with other configurations in .htaccess file