Posted to tcl by steve at Tue Aug 19 18:50:38 GMT 2014view pretty
diff -r 231ef31a11a9 Utilities/Http.tcl --- a/Utilities/Http.tcl Tue Sep 17 12:17:32 2013 +1000 +++ b/Utilities/Http.tcl Tue Aug 19 11:51:21 2014 -0700 @@ -175,7 +175,13 @@ # clf - common log format proc clf {r} { - lappend line [dict get $r -ipaddr] ;# remote IP + # are we getting our remote address from an HTTP header? + if { [Site var? Log address_from_header] ne "" } { + lappend line [dict get $r -[string tolower [Site var? Log address_from_header]]] + } else { + lappend line [dict get $r -ipaddr] ;# remote IP + } + lappend line - ;# RFC 1413 identity of the client. 'sif set user [dict get? $r -user] ;# is there a user identity? if {$user ne ""} {