H
H
HAbRAhabp2015-11-28 20:32:01
Nginx
HAbRAhabp, 2015-11-28 20:32:01

How can you weed out left referrers?

What regular expression can be made for such a purpose?

if ($http_referer != "example.com") {
return 403;
}

This doesn't work because the referrer also contains http
How can I make sure that only the content of the domain in the referrer is checked?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2015-11-29
@HAbRAhabp

nginx.org/en/docs/http/ngx_http_referer_module.html
ngx_http_referer_module

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question