On Dec 14, 3:05 am, judotenslab <[email protected]> wrote:
> i used this for disallow some ip from my web:
>
> def get(self):
>   spammer_list = ("123.123.123.123","122.122.122.122")
>   visitor_ip = self.request.remote_addr
>   if visitor_ip is in spammer_list:
>      self.response.redirect("/blocked")

Or even better:

   self.error(404)

Instead of the redirect line. Saves you serving the spammer one more
page (blocked), and if their system is at all smart it will stop
pinging you when it gets the 404..

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.


Reply via email to