FIX: ip lookup not working

Also add a powered by line so it is clear this makes an external service call
This commit is contained in:
Sam
2017-08-21 14:18:40 -04:00
parent c264348fcb
commit 2f0c6c99e0
4 changed files with 10 additions and 1 deletions

View File

@ -292,7 +292,7 @@ class Admin::UsersController < Admin::AdminController
ip = params[:ip]
# should we cache results in redis?
location = Excon.get("http://ipinfo.io/#{ip}/json", read_timeout: 30, connect_timeout: 30).body rescue nil
location = Excon.get("https://ipinfo.io/#{ip}/json", read_timeout: 10, connect_timeout: 10).body rescue nil
render json: location
end