2009/7/6 Monty808 <[email protected]> > > Hi, > > Normally I use env['REMOTE_ADDR'] to get the IP address. But..on > webfaction using wsgi...I have to use X-Forwarded-For to get the IP > address. > > So...what is the code to get the IP address?
Try using web.ctx.ip. If that doesn't work, try web.ctx.env['HTTP_X_FORWARDED_FOR']. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
