'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 23 May 2007 at 1:57:15 pm'! !HttpRequest methodsFor: 'initialize-release' stamp: 'je77 5/23/2007 13:56'! initProxyForwarding "If a proxy exists on the host, change the remoteAddress to ignore the proxy." | forwardingAddress | self remoteAddress = stream socket localAddress ifTrue: ["A proxy probably exists, because the request is from the local machine." forwardingAddress := self headerAt: 'x-forwarded-for' ifAbsent: [^self]. "Convert forwardingAddress string to ByteArray" (forwardingAddress includes: $,) ifTrue: [ "Use only the last entry as this is the only trustable one" forwardingAddress := forwardingAddress copyAfterLast: $,]. forwardingAddress := forwardingAddress asIpByteArray. self remoteAddress: forwardingAddress]! !