Score:0

Apache2.4 SetEnv to value of request header

cn flag

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.

Score:0
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.