Having an issue with valid referrers not being considered in the nginx config. I have domaina.com calling images from domainb.com. The issue is that the domainb.com images are being hotlinked. so i have created a page rule like this in cloudflare.
https://domainb.com/images/*
Cache Level: Bypass
Then placed this code in the domainb.com nginx config.
location /images/ {
valid_referers none blocked domaina.com *.domain.com;
if ($invalid_referer) {
return 403;
}
But when i visit an URL on domaina.com, the images from the domainb.com are blocked with 403 error. what am i doing wrong!