Welcome Guest, Not a member yet? Register   Sign In
Apache Headers on Incoming Request
#1

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?
Reply


Messages In This Thread
Apache Headers on Incoming Request - by Derek - 12-23-2020, 11:50 AM
RE: Apache Headers on Incoming Request - by Derek - 04-29-2021, 02:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB