Missing authorization data on Apache request header
Sep 1, 2022
Creating a restful service for CRUD operations. However, the request header data with authorization token is always missing.
The cause is on the webserver. If using Apache for your webserver, it will ignore Authorization header.
The way to make that work is adding the following on top of the Apache httpd.conf setting file.
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
httpd.conf is located at /etc/httpd/conf/