简体   繁体   中英

Add custom header in apache2 before proxyPass

In apache before proxy I want to add an authentication header for aws signature. So basically it should add the following headers

x-amz-date   : date
Authorization : AWS access_key:aws_signature

This aws signature will require a program to get generated.

What possible options we can use to link apache2 to add this auth headers?

If the values are not dynamic, and the Apache config doesn't care about these headers on input, you can just use RequestHeader :

RequestHeader set x-amz-date date early
RequestHeader set Authorization "AWS access_key:aws_signature" early

If either value is dynamic, use "expr=..." as the value value to pull the dynamic bits you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM