ipinfo-rails 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/ipinfo-rails/version.rb +1 -1
- data/lib/ipinfo-rails.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7afb846da30144077a602885bacbd5ae683083c7c5cf7ef96669b87ad1953e64
|
4
|
+
data.tar.gz: 0cd3f7f0be43e6ea9bb5fe027efdc072d52ff23a4d2f725638014e58060f2fb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5b289c284e54ec051c93c81fd5ef4cbf0a23e83bf621730e0bc3f6cc64908b711aa70445c48d5c0fd6a5aae919f9541ed68d5546642465d45f29072d3ffd28c
|
7
|
+
data.tar.gz: 1a0cfd1a9379bd0c1542398f37c24a00ada8d28cb2462b70649dca1688edb5465d5886cbd4301645d9382678ed1346b0c4c278349bafe04c505e73b0170c8dd9
|
data/README.md
CHANGED
@@ -223,6 +223,6 @@ There are official IPinfo client libraries available for many languages includin
|
|
223
223
|
|
224
224
|
## About IPinfo
|
225
225
|
|
226
|
-
Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, company, carrier, privacy detection (VPN, proxy, Tor), hosted domains, and IP type data sets. Our API handles over
|
226
|
+
Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, company, carrier, privacy detection (VPN, proxy, Tor), hosted domains, and IP type data sets. Our API handles over 40 billion requests a month for 100,000 businesses and developers.
|
227
227
|
|
228
228
|
![image](https://avatars3.githubusercontent.com/u/15721521?s=128&u=7bb7dde5c4991335fb234e68a30971944abc6bf3&v=4)
|
data/lib/ipinfo-rails/version.rb
CHANGED
data/lib/ipinfo-rails.rb
CHANGED
@@ -34,7 +34,11 @@ class IPinfoMiddleware
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def is_bot(request)
|
37
|
-
|
38
|
-
|
37
|
+
if request.user_agent
|
38
|
+
user_agent = request.user_agent.downcase
|
39
|
+
user_agent.include?('bot') || user_agent.include?('spider')
|
40
|
+
else
|
41
|
+
false
|
42
|
+
end
|
39
43
|
end
|
40
44
|
end
|