Forum Discussion
uni
Dec 04, 2013Altostratus
The CLIENT_ACCEPTED event is not required. [IP::client_addr] is available in the HTTP_REQUEST event. There is a bracket missing after the 'if' in the HTTP_REQUEST event. You should use the IP::addr command to compare IP addresses
when HTTP_REQUEST {
if {[IP::addr [IP::client_addr] equals 172.18.33.226]} {
HTTP::respond 200 content "${static::IPBlock}"
}
}
Your use of a static variable to hold the response is ok, but I would consider using an iFile, which makes it easier to manage.