Forum Discussion
nitass
Jun 27, 2012Employee
This isn't possible using HTTP:: commands as the HTTP profile actions are performed before HTTP_REQUEST is triggered.thanks!
just fyi.
[root@ve1024:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
myhttp {}
tcp {}
}
}
[root@ve1024:Active] config b profile myhttp list
profile http myhttp {
defaults from http
insert xforwarded for enable
}
[root@ve1024:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
log local0. [HTTP::request]
}
when HTTP_REQUEST_SEND {
set req "HTTP::request"
log local0. [clientside { $req }]
}
}
[root@ve1024:Active] config curl -I http://172.28.19.79
HTTP/1.1 200 OK
Date: Wed, 27 Jun 2012 18:16:37 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
ETag: "4183e4-3e-9c564780"
Accept-Ranges: bytes
Content-Length: 62
Content-Type: text/html; charset=UTF-8
[root@ve1024:Active] config
/var/log/ltm
Jun 27 11:16:26 local/tmm info tmm[4861]: Rule myrule : HEAD / HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Host: 172.28.19.79 Accept: */* X-Forwarded-For: 172.28.19.80
Jun 27 11:16:26 local/tmm info tmm[4861]: Rule myrule : HEAD / HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Host: 172.28.19.79 Accept: */* X-Forwarded-For: 172.28.19.80