http - Get real client IP in OpenShift? -


i tried an application, , used way ban send more 5 empty requests server, problem then, got blocked, , because seen 1 unique ip.

in code, used way x-real-ip doesent work on openshift, how then?

here how ip:

x_real_ip = self.request.headers.get("x-real-ip")             remote_ip = self.request.remote_ip if not x_real_ip else x_real_ip 

update: '127.3.165.129', none) when doing print(self.request.remote_ip, x_real_ip)

you want "x-forwarded-for" header visitors ip address. seeing ip address of reverse proxy users go through before ending @ application/gear.

you can refer article in developer center more information how requests routed on openshift: https://developers.openshift.com/en/managing-port-binding-routing.html


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -