简体   繁体   English

在proxyPass之前的apache2中添加自定义header

[英]Add custom header in apache2 before proxyPass

In apache before proxy I want to add an authentication header for aws signature.在代理之前的apache我想为aws签名添加一个身份验证header。 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.这个 aws 签名需要一个程序来生成。

What possible options we can use to link apache2 to add this auth headers?我们可以使用哪些可能的选项来链接 apache2 以添加此身份验证标头?

If the values are not dynamic, and the Apache config doesn't care about these headers on input, you can just use RequestHeader :如果值不是动态的,并且 Apache 配置不关心输入的这些标头,您可以只使用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.如果任一值是动态的,请使用“expr=...”作为值来提取您需要的动态位。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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