CodeIgniter Forums

Full Version: Apache Headers on Incoming Request
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I deal mostly in building API's and lately my authentication has been coming through as a Bearer Token passed in through an "Authorization" header. The problem that I have is that the IncomingRequest class currently does not load that header because it is not part of the $_SERVER array. In my Google searching I found that most people are suggesting to use apache_request_headers() to get that and I have created a way to do that in my code but I think this could be a valuable feature to add for anyone using CodeIgniter. My thought process is to add a configuration somewhere that allows a dev to tell CodeIgniter to check for apache headers when running the Message::populateHeaders method. Then if that is set, use apache_request_headers() to get those headers and add them to the headers in the request. What are your thoughts on that plan and where would you think makes sense to put that configuration?