Forum Discussion
Michael_Horvat_
Nimbostratus
Mar 13, 2007URI redirects with client cert in header
I cannot get this rule to work. I need to insert the client cert subject into the header and then redirect traffic based on client IP address and the URI they are attempting to go too. Each command in the HTTP_Request event works separate. Using only the header insert allows traffic, and using only the http_uri allows traffic. But when trying to insert the Header value and use the URI pool selection in conjunction the rule no longer works. Does anyone know why this is.
when CLIENTSSL_HANDSHAKE {
set cur [SSL::sessionid]
set ask [session lookup ssl $cur]
if { $ask eq "" } { session add ssl [SSL::sessionid] [SSL::cert 0]}
}
when HTTP_REQUEST {
set id [SSL::sessionid]
set the_cert [session lookup ssl $id]
if { $the_cert != "" } {
HTTP::header insert CertSubject [X509::subject $the_cert]}
if { [matchclass [IP::client_addr] equals $::DVW] and
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or} {
use pool test
}
elseif { [matchclass [IP::client_addr] equals $::MVW] and
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxxt" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" or
[HTTP::uri] starts_with "/xxx" } {
use pool test_a
}
}
No RepliesBe the first to reply
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