I'm trying to implement download hotlinking protection.
I've this code
location /download/ {
valid_referers blocked server_names *.example.com;
if ($invalid_referer) {
return 403;
}
Working fine, this allow specify domain and block whatever is not in valid_referers, What is the problem? i want to implement a specify IP allowed to use not referer and rest block it.
This is what log shows.
1.2.3.4 - - - "GET file.doc HTTP/2.0" 200 13050 "-" "-"
I want only 1.2.3.4 accept none referer.