Hotlink в Nginx

Требования:
ngx_http_referer_module

Конструкция

server {
	...
	location ~ \.(jpg|jpeg|png|gif)$ {
		valid_referers none blocked server_names *.YOUSITE1.NET, *.YOUSITE2.NET;
		if ($invalid_referer){return 403;}
		}
	}