1 year ago
#352357
John Burden
Changing Request header definition and forwarding to application server
I apologize if my terminology is incorrect.
I'm trying to change the name of an incoming header without changing the frontend connection configuration because I have a current server that uses the current value and a new server that has to use a different value on the same physical machine and same IP.
Currently getting from front end
RequestHeader set X-Y_Z %{SSL_CLIENT_S_DN_CN}e \<---- with an underscore in the definition
On the new application, using python / django, django framework apparently doesn't accept any headers with an underscore in them. It strips them completely. In apache logs, it shows up and the information is being passed, but not to the application.
I set up a reverse proxy with apache in front of the application and tested it out with a dash instead of underscore, and everything works fine. In django, the default for remote user authentication is remote_user everywhere so instead of using X-SSL-Client-CN, I just used Remote-User and that worked. Client authentication from CAC is coming across fine.
Is there some method to rewrite the header definition using the reverse proxy in front of the apache server with the application or, within the server if possible?
Basically, I want to be able to receive X-Y_Z but send it to the application server as REMOTE-USER.
I have tried several different set request header ideas and tried some things in the application to no avail.
python
django
apache
request-headers
0 Answers
Your Answer