[users@httpd] Apache2.2.2: mod_headers %{env-var}e

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have a reverse proxy (Apache2.2.2) where I want to set a request header "a" based on the value of another request variable "b". Additionally, request header "b" must have a certain value. If request header "b" doesn't match that certain value, I don't want to set request header "a".
This is how I planned to do this:

- Check request header "b" and set an environment variable if true. (SetEnvIf) - Set request header "a" with value of request header "b" when the environment variable, mentioned above, is set.

eg:
SetEnvIf MyRequestVar_b ^regex$ SET_HEADER_OK
RequestHeader set MyRequestVar_a %{HTTP_MYREQUESTVAR_B}e env=SET_HEADER_OK


I'm not sure what I'm doing wrong but the second line works under Apache2 but always returns (null) under apache2.2.2. I need apache2.2.2 because of its keep-alive functionality as reverse-proxy.
Can all request headers be used for matching in the directive SetEnvIf?
Maybe I am using a wrong syntax for looking up the environment variables?

Any help would be kindly appreciated.

Philip

--
Brusten Philip
LUDIT - K.U.Leuven
http://shib.kuleuven.be
W. de Croylaan 52A | 3001 Heverlee | Belgium
philip.brusten@xxxxxxxxxxxxxx

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux