Sunil Kumar Sunil Kumar - 3 months ago 15
Python Question

Restrict IP addresses to access your application on GAE?

I have an application on GAE . Suppose I want that application to available on to 172.12.. IP addresses . How can i do that ?

Answer
ip = self.request.remote_addr

if ip in allowed_ip_list:
    allow_access = True
else:
    allow_access = False

More detailed answer here: Get IP address in Google App Engine + Python

Comments