Skip to content

Instantly share code, notes, and snippets.

@jsn
Last active March 25, 2020 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsn/fff04d868005d8fe880dd1cd12d164e2 to your computer and use it in GitHub Desktop.
Save jsn/fff04d868005d8fe880dd1cd12d164e2 to your computer and use it in GitHub Desktop.
set $to_yandex 0;
if ($cookie_bltsr) {
set $to_yandex 1;
}
if ($http_x_aab_http_check) {
set $to_yandex 1;
}
if ($request_method != GET) {
set $to_yandex 0;
}
if ($uri ~ "/__cr/.*") {
set $to_yandex 1;
}
if ($http_x_aab_proxy) {
set $to_yandex 0;
}
if ($to_yandex = 1) {
return 421 ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment