0

I want to set the value of env with a request header.

    SetEnv X_THING %{req:thing}

but it's not working as planned; it looks like the value of SetEnv isn't being evaluated.

Konchog
  • 101
  • 2

1 Answers1

0

This isn't so hard.
Basically, using the regex portion of SetEnvIf to extract the string, and use that to set the environment

    SetEnvIf thing ^(.*)$ X_THING=$1

Just be aware that anything put in there must be sanitised, since it comes from the remote request.

Konchog
  • 101
  • 2