On my local development (vagrant, apache, ubuntu) I have no problem setting Access-Control-Allow-Headers using PHP headers function.
But in production, Litespeed on CENTOS 6.7. The php header function is ignored and the Access-Control-Allow-Headers are always set to
X-Accept-Charset,X-Accept,Content-Type.
But I can set them in the htaccess file.
Header set Access-Control-Allow-Headers Origin, Content-Type, Accept, Authorization, X-Requested-With
The PHP headers function does work in production for
Access-Control-Allow-Origin "*"
This seems like a server configuration issue but I can't figure out where it is being set.
Why would litespeed ignore PHP header function for some headers and not others?