R
R
Ratmir_VS2016-01-19 23:30:25
Nginx
Ratmir_VS, 2016-01-19 23:30:25

How to block all requests with double underscore in $http_referer line in nginx?

In nginx, in the $http_referer line (or with the help of any other construction), you need to block all requests that have __ (double underscore) ??
An example of an invalid request site.com/422.h__tml/71wf4xa9d/
to be rejected
if ( $http_referer ~* (__)* )
{
return 444;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ratmir_VS, 2016-01-20
@Ratmir_VS

The problem is not even to use manuals or certain designs.
The problem is that these __ signs cannot be separated from the query string to the site.
location ~* __$ {
return 404;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question