Answer the question
In order to leave comments, you need to log in
How to leave those browsers that you need in $http_user_agent under nginx?
There is such a code.
if ($http_user_agent ~* msnbot|scrapbot) {
return 403;
}
Answer the question
In order to leave comments, you need to log in
You in the documentation, not here.
Try it!:
if (!$http_user_agent ~* msnbot|scrapbot) {
return 403;
}
if ($http_user_agent !~* msnbot|scrapbot) {
return 403;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question