I'm trying to access custom request headers in a Micro application (REST api) and I can't seem to access some of them.
I'm using $app->request->getHeader('My-Custom-Header');
but it returns an empty string for one of my headers.
I'm just using CURL to test this at the moment. I've looked at this post here https://forum.phalconphp.com/discussion/802/access-request-headers-from-phalcon-mvc-micro but unfortunately I'm not using NGINX.
The curl request is as follows:
curl -H"Authorization:Bearer 12345" -H"foo:foo"
Phalcon doesn't see 'Authorization' but it will print 'foo'
What's even more interesting though is that if I call var_dump(getallheaders()) so using PHP's native function, the Authorization header is present, implying to me it isn't an issue with the Apache or php configuration (though I could obviously be wrong).
Any thoughts anyone?