(Migrated) how to get request client host from service

(This message has been automatically imported from the retired mailing list)

how to get request client host from service=EF=BC=8C I need it to differe=
ntiate which system send request to service

–=C2=A0
NikSun
Sent with Airmail

On 11/29/2013 09:50 AM, NikSun wrote:

how to get request client host from service, I need it to differentiate which system send request to service

Hello,

assuming this is HTTP, please add the ‘option forwardfor’ entry to
load-balancer’s configuration in its source code view to the ‘frontend
front_http_plain’ stanza.

https://zato.io/docs/web-admin/load-balancer/source-code.html

For instance, right above ‘option httplog’, add ‘option forwardfor’.

And then the client IP will be in a service’s
self.wsgi_environ[‘HTTP_X_FORWARDED_FOR’]

It’s a good idea to add this ‘forwardfor’ option by default so this is
what 1.2 will do.

thanks,

On 11/29/2013 09:50 AM, NikSun wrote:

how to get request client host from service, I need it to differentiate which system send request to service

Hello,

assuming this is HTTP, please add the ‘option forwardfor’ entry to
load-balancer’s configuration in its source code view to the ‘frontend
front_http_plain’ stanza.

https://zato.io/docs/web-admin/load-balancer/source-code.html

For instance, right above ‘option httplog’, add ‘option forwardfor’.

And then the client IP will be in a service’s
self.wsgi_environ[‘HTTP_X_FORWARDED_FOR’]

It’s a good idea to add this ‘forwardfor’ option by default so this is
what 1.2 will do.

thanks,