Can somebody tell me why this snippet return 404 when I'm trying to access images directly or from the original site (by link).
location ~* \.(ico|jpeg)$ {
valid_referers none blocked example.com *.example.com;
if ($invalid_referer) {
return 403;
}
}
As far as I understand it should return 403 for non original sites. Why it returns 404? If I disable this snippet everything is accessible again (as normal).
Now it sits inside server block.
Should I put it inside server's block / location?