How to protect images by referer?

There is such configuration to protect from hotlinking:
location ~* ^.*\.(jpeg|jpg|gif|png)$ {

 "valid_referers" none blocked example.com *.example.com ~(google.|etc.);

 if ($invalid_referer) {
 return 403;
}

 root /root/public_html;
 access_log off;
 expires 30d;
 error_page 404 = @apache;

}

Check:
wget --referer=http://ghfj.EN http://example.com/image.jpg
--2016-11-09 17:40:21-- http://example.com/image.jpg
Resolving example.com (example.com) 10.10.10.1... 
Connecting to example.com (example.com)|10.10.10.1|:80... connected.
HTTP request sent, awaiting response 403 Forbidden... 
2016-11-09 17:40:21 ERROR 403: Forbidden.

It would seem - hurrah, all works, however:
wget --referer=ghfj.ru http://example.com/image.jpg
--2016-11-09 17:40:28-- http://example.com/image.jpg
Resolving example.com (example.com) 10.10.10.1... 
Connecting to example.com (example.com)|10.10.10.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 121414 (119K) [image/jpeg]
Saving to: `image.jpg'

100%[=====================================================================================================================================================================================================>] 121 414 --.-K/s in 0.003 to s 

2016-11-09 17:40:28 (39.3 MB/s) - `image.jpg' saved [121414/121414]

Ie if the referrer to specify just the domain without http, the protection on nginx is not working how can I solve this problem?
July 2nd 19 at 18:04
2 answers
July 2nd 19 at 18:06
Solution
Browser sends http referrer, and specifically modeled the queries do not worry, they quietly and valid referrer slipped.
July 2nd 19 at 18:08
but what's the point of this protection?
Don't really know as it is the customer's problem, not mine. But in principle, as all - to protect images from downloading by robots - maritza24 commented on July 2nd 19 at 18:11
of download robots (the robot always fills need Ref), and pasted into other sites - mina50 commented on July 2nd 19 at 18:14
: personally, when I put on other sites my pictures, just take the picture and substitute the link to some CPU, and send the website to Roskomnadzor - Chelsie55 commented on July 2nd 19 at 18:17
: are you a tyrant - mina50 commented on July 2nd 19 at 18:20

Find more questions by tags Nginx