Missing authorization data on Apache request header

George Tseng
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/

--

--

George Tseng

An application developer with extensive experience and enthusiastic about new tech currently working in IT Department of a manufacture company.