That may work, but I have multiple accept-languages. I can read in Russian
and English, even though I am an American living in USA.
Accept-Language values can have multiple values, so by blocking ru-RU you
are just blocking anyone who can read russian.
here's my header...
I suggest never block anyone. It's better to use honeytraps/sandboxes.
Use a geoip library (http://pythonhosted.org/python-geoip/ or similar)
if ipfrom == 'ru':
redirect(... nice static page ...)
If you use nginx you can do that almost out of the box with many other
options such as
weirdest requirement ever but not hard
if T.accepted_language in ('ru-RU', ):
raise HTTP(404)
On Friday, June 12, 2015 at 7:31:41 PM UTC+2, lucas wrote:
hey everyone,
via google analytics, i am getting an inordinate amount of traffic from
russia. my site would not be of
true, it is a weird request. but maybe so is the russians hacking away.
thanx for the help, i'll drop a message in a few days if i see the
analytics from russia go to zero, that would be nice. thanx again, lucas
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
4 matches
Mail list logo