Β ππ·πΊ Block access to your software from Russia IPs
Russian Terrorist Army has attacked my country. It is bombing my hometown (Chernihiv). It is threatening life of my family. My grandmother is in a village occupied by Russians. She has no access to food an help.
As a software developer, this might be one of the easiest things you can do:
π Block access to your software to anybody from Russia IPs π
Complete technological embargo.
If youβre running a Ruby on Rails app, it takes just one gem and one before_action to do:
bundle add geocoder
request.ip # => 233.543.123.235
request.location.country # => RU
# app/controllers/application_controller.rb
before_action do
if request.location.country.eql?("RU")
redirect_to "https://www.ukr.net/"
end
end
Resources:
Update: @rameerez has created a gem that blocks all requests from Russia.
Did you like this article? Did it save you some time?