-1

I have a regular expression for the HttpOnly configuration :

Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure

For Appdynamics EUM, i want to exclude from this regular expression everything that begin with "ADRUM" (without quotes).

How can i proceed ?

Thanks a lot for your help

Best regards ! Ludo

Chris Lear
  • 6,057
  • 1
  • 14
  • 25
Ludovic LACHEVRE
  • 101
  • 1
  • 11
  • I added tags for `apache` and `mod-headers`, because this isn't really a question about regex, or a question about httponly, but a question about how to configure apache to do a certain thing. – Chris Lear Jun 06 '16 at 13:54

1 Answers1

0

I think this should do what you want. I'm afraid it's not tested, but the principle is this:

1) if the Set-Cookie header starts with ADRUM, then set the env variable ADRUM_cookie.

2) if the ADRUM_cookie env variable is /not/ set, edit the Set-Cookie header.

SetEnvIf Set-Cookie ^ADRUM ADRUM_cookie
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure env=!ADRUM_cookie
Chris Lear
  • 6,057
  • 1
  • 14
  • 25