On 2003.07.20, Gustaf Neumann <[EMAIL PROTECTED]> wrote:
>  my primary point is: if you are running an aolserver behind a proxy,
>  the current value of [ns_conn peeraddr] is not very useful.

So:

proc ns_clientaddr {} {
    set addr [lindex [ns_set iget [ns_conn headers] x-forwarded-for] end]
    if {[string length $addr] == 0} {
        return [ns_conn peeraddr]
    } else {
        return $addr
    }
}

I'm still unsure what benefit there is in changing the current semantics
of [ns_conn peeraddr] ...

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to