Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are Apache/php Headers in different case on Server vs local

Is there an Apache or Php setting that would change a header returned by getallheaders() from Capitalized to lowercase?

On my localhost it receives an Authorization header but the same code returns authorization on the server. and the same client(Postman) is being used in both cases

like image 595
jonnie Avatar asked Aug 03 '26 08:08

jonnie


1 Answers

$headers = array_change_key_case(getallheaders(), CASE_LOWER);

like image 95
ridwannhidayat Avatar answered Aug 05 '26 21:08

ridwannhidayat