Forum Discussion
Ben_Wilson_2412
Cirrus
Oct 09, 2013eval is HTTP:response
I thought there was a way to include evaluated expressions in the HTTP:response command.
Something like
when HTTP_REQUEST {
HTTP::respond 200 content {
Pretend this ...
Kevin_Stewart
Employee
Oct 09, 2013You can definitely use evaluated expressions in an HTTP::respond command, but your example is a little off. You would include any HTTP headers AFTER the content. Example:
when HTTP_REQUEST {
HTTP::respond 200 content "..." "True-Client-IP" [IP::client_addr]
}
Your example assumes the X-Forwarded-For header would be in the HTTP request, which the client (a browser) would not generally send. So if you need to send the client source address back to the client, you could simply use [IP::client_addr].
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects