Comments (3)
Hi. This sounds reasonable, and should be a simple change.
Submit a pull request and I'll have a look at it.
from varnish-devicedetect.
Hi,
this morning I made a very quick and very dirty patch to address this issue, like this
if (req.http.User-Agent ~ "(?i)(ads|google|bing|msn|yandex|baidu|ro|career|)bot" ||
req.http.User-Agent ~ "(?i)(baidu|jike|symantec)spider" ||
req.http.User-Agent ~ "(?i)scanner" ||
req.http.User-Agent ~ "(?i)(web)crawler") {
if (req.http.User-Agent ~ "iPhone; CPU iPhone") {
set req.http.X-UA-Device = "mobile-bot";
} else {
set req.http.X-UA-Device = "bot";
}
}
If you're interested I can arrange a pull request for you and the OP
from varnish-devicedetect.
For future reference, this was added in e599737.
from varnish-devicedetect.
Related Issues (17)
- WURFL and Varnish Cache HOT 1
- [regex] detection logic based on Mobile_Detect.json HOT 8
- iOS User-Agent used in OS process retrieving icons for “Add To Home Screen” not recognized as a mobile device. HOT 6
- Tablet PC in varnish-device detect HOT 2
- Google Mobile bot HOT 5
- Performance Benchmark? HOT 4
- Microsoft Surface handling HOT 2
- new google mobile-bot HOT 5
- Wrong X-UA-Device HOT 6
- Add more User-Agents HOT 9
- FirefoxOS detection HOT 4
- `Set-Cookie: ..SameSite=None` on supported browser HOT 1
- If there is a remote backend, the front server cache nothing HOT 1
- Licence? HOT 2
- Why 'pc' type instead of the usual 'desktop' one? HOT 2
- Facebook's iPad in-app browser is detected as mobile I/o tablet HOT 2
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 varnish-devicedetect.