'Apache Variables to CF CGI Variables
I have added additional Apache Variable set using SetEnv. The problem was when Iam trying to past it to CF Application and writedump(cgi) it doest have that env i set.
Apache2 Side
env.conf
SetEnv HELLO_WORLD "hello world"
CF side
netmon.cfm
<cfscript>
writedump(cgi);
<cfscript>
Solution 1:[1]
I believe the only way to do this is pass the environment variable into a rewrite rule or probably easier into a header variable.
SetEnv HELLO_WORLD "hello world"
RequestHeader set X-Custom-Message "%{HELLO_WORLD}e"
Then access in ColdFusion like this.
<cfscript>
writeDump(GetHTTPRequestData().headers['X-Custom-Message']);
</cfscript>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Byron70 |
