Ah.. now I found the code option. Sorry, new here
🙂
when HTTP_REQUEST {
Check URI and match against allowed IP-addresses
if { [HTTP::uri] contains "check-status" and [matchclass [IP::remote_addr] equals $::private_networks]} {
set ::reqcookiecount [HTTP::cookie count]
set ::refererurl [string map [list "check-status" ""] [HTTP::uri]]
set ::reqcookies ""
set ::printout "yes"
Fetch the cookie names and content
foreach cookie [HTTP::cookie names] {
append ::reqcookies "$cookie = [HTTP::cookie value $cookie]"
}
}
}
when HTTP_RESPONSE {
if { $::printout equals "yes"} {
Get cookie information
set rescookiecount [HTTP::cookie count]
set rescookies ""
foreach cookie [HTTP::cookie names] {
append rescookies "$cookie = [HTTP::cookie value $cookie]"
}
Get time and format it
set curtime [clock seconds]
set formattedtime [clock format $curtime -format {%d %b %Y %T}]
Print web page
log "This is where page is printed out."
HTTP::respond 200 content "
"
set ::printout ""
set ::refererurl ""
}
}