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...
en-US,en;q=0.8,ru;q=0.6

so blocking ru-RU may not work in any case. You might have to specify 'ru' 
but I would only suggest that you block those that have it as their first 
preference or highest q-number.



On Friday, June 12, 2015 at 11:55:50 AM UTC-7, Niphlod wrote:
>
> 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 interest to russians.  i have a list of 
>> IPs and net masks for dropping that traffic using iptables but for some 
>> reason i am still getting some russian traffic.
>>
>> how can i also detect the ru language and then tell web2py to drop or 
>> cancel the sending of any subsequent page or view?  i guess i want web2py 
>> to act as a backup filter to iptables.
>>
>> ok, thank in advance, lucas
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to