Comments (5)
Hello,
Is it possible that user_agent
in call to Legitbot.bot(user_agent, ip)
is nil
? Please try at least bot(user_agent || '', ip)
or alike.
Regards,
Alexander
from legitbot.
Hello,
Is it possible that
user_agent
in call toLegitbot.bot(user_agent, ip)
isnil
? Please try at leastbot(user_agent || '', ip)
or alike.Regards,
Alexander
Thanks for reply, This is my code:
@is_robot = ::Legitbot.bot(request.user_agent || '', request.remote_ip)&.valid? || false
from legitbot.
Did it help? Do you still have the problem?
from legitbot.
Did it help? Do you still have the problem?
Yes,still have the problem
NoMethodError: undefined method `empty?' for nil:NilClass
…ms/legitbot-1.0.1/lib/legitbot/validators/ip_ranges.rb: 43:in `valid_ip?'
…ms/legitbot-1.0.1/lib/legitbot/validators/ip_ranges.rb: 20:in `valid_ip?'
…uby/2.6.0/gems/legitbot-1.0.1/lib/legitbot/botmatch.rb: 25:in `valid?'
…uby/2.6.0/gems/legitbot-1.0.1/lib/legitbot/legitbot.rb: 27:in `select'
…uby/2.6.0/gems/legitbot-1.0.1/lib/legitbot/legitbot.rb: 27:in `bot'
…200811072934/app/controllers/application_controller.rb: 164:in `check_robot'
user-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.4 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.4 facebookexternalhit/1.1 Facebot Twitterbot/1.0
I can not get client ip.
from legitbot.
It looks like another problem. I am closing this issue. Would you mind creating a new issue with the stacktrace and the description how it happens? It would help a lot if you could provide a test case.
Regards,
Alexander
from legitbot.
Related Issues (20)
- Upgrade `create-pull-request` to V5
- Split Google crawlers into categories
- Possible Facebook RADB source issue? HOT 1
- NoMethodError when using valid? or fake? method with FB useragent HOT 11
- New: Marginalia
- DuckDuckGo Browser, identified as bot.
- Migrate from Travis CI to Github Actions
- Is API ready for 1.0 ?
- NoMethodError: undefined method `empty?' for nil:NilClass HOT 9
- Does AppleBot still masquerate as GoogleBot? HOT 3
- Petalbot tests are failing
- Update the list of Oracle IPs
- New: Amazon / Yahoo
- iMessageBot HOT 1
- Automate the process of updating IPs
- Mock Resolv
- Resolv issues with googlebot sometimes HOT 7
- Add missing Google crawlers HOT 4
- Add support for GPTBot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legitbot.