Forum Discussion
Kai_Wilke
Feb 18, 2016MVP
Hi Nick,
you may try this iRule as a starting point...
when CLIENT_ACCEPTED {
if { ( [IP::addr [IP::client_addr] equals 10.0.0.0/8] ) or
( [IP::addr [IP::client_addr] equals 172.16.0.0/12] ) or
( [IP::addr [IP::client_addr] equals 192.168.0.0/16] ) } then {
set external_client 0
} else {
set external_client 1
}
}
when HTTP_RESPONSE {
if { $external_client } then {
HTTP::header remove SILLY_HEADER1
HTTP::header remove SILLY_HEADER2
HTTP::header remove SILLY_HEADER3
HTTP::header remove SILLY_HEADER4
}
}
Note: If you internal Network is more complex, then you may also checkout the [class match] command using IP address based datagroups.
Update: Corrected the code to strip the header for external clients.
Cheers, Kai