Fix Fastly bot block for Ruby Net::HTTP clients (#15713)

I was using the wrong VCL request property. It's `req.url`, not `req.http.url`.

https://developer.fastly.com/reference/vcl/variables/client-request/req-url/
This commit is contained in:
Jamie Gaskins 2021-12-08 12:32:04 -05:00 committed by GitHub
parent 74b065be58
commit e188eac55d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ sub vcl_recv {
|| req.http.user-agent == "RSurf15a 51"
|| req.http.user-agent == "RSurf15a 81"
# Block Ruby bots unless they're interacting with the API
|| (req.http.user-agent == "Ruby" && !(req.http.url ~ "^/api"))
|| (req.http.user-agent == "Ruby" && !(req.url ~ "^/api"))
|| req.http.user-agent == "searchbot admin@google.com"
|| req.http.user-agent == "ShablastBot 1.0"
|| req.http.user-agent == "snap.com beta crawler v0"