block google app

lists at lazygranch.com lists at lazygranch.com
Wed Jun 21 01:35:47 UTC 2017


I think the ipad is the useragent. I wiped out that access.log, but
here is a fresh one showing a browser (user agent) in the proper field.

200 76.20.227.211 - - [21/Jun/2017:00:48:45 +0000] "GET /images/photo.jpg HTTP/1.1" 91223 "http://www.mydomain.com/page.html" "Mozilla/5.0 (Linux; Android 6.0.1; SM-T350 B
uild/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Safari/537.36" "-"

I sanitize these a bit because I don't like this stuff showing up in
google searches, but the basic format is the same. I use a custom log
file format. 


On Tue, 20 Jun 2017 17:49:14 -0700
Robert Paprocki <rpaprocki at fearnothingproductions.net> wrote:

> Do you mean $http_user_agent?
> 
> > On Jun 20, 2017, at 17:36, "lists at lazygranch.com"
> > <lists at lazygranch.com> wrote:
> > 
> > I would like to block the google app from directly downloading
> > images. 
> > 
> > access.log:
> > 
> > 200 186.155.157.9 - - [20/Jun/2017:00:35:47 +0000]
> > "GET /images/photo.jpg HTTP/1.1" 334052 "-"
> > "com.google.GoogleMobile/28.0.0 iPad/9.3.5 hw/iPad2_5" "-"
> > 
> > 
> > My nginx code in the images location:
> > 
> > if ($http_referer ~* (com.google.GoogleMobile)) {
> >    return 403;
> >    }
> > 
> > So what I am doing wrong?
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx  
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list