From 522d47be66d1f2d0e8b6f89913e2b45f89dd730e Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 28 May 2019 01:20:47 +0100 Subject: [PATCH] tilecache: block node-fetch UA --- cookbooks/tilecache/templates/default/nginx_tile.conf.erb | 1 + cookbooks/tilecache/templates/default/squid.conf.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index 7343e066d..40b13c371 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -48,6 +48,7 @@ map $http_user_agent $denied_scraper { default 0; # Not denied '~^Python\-urllib\/' 1; # Library Default '~^python\-requests\/' 1; # Library Default + '~^node\-fetch\/' 1; # Library Default '~^R$' 1; # Library Default '~^Java\/' 1; # Library Default '~^tiles$' 1; # Library Default diff --git a/cookbooks/tilecache/templates/default/squid.conf.erb b/cookbooks/tilecache/templates/default/squid.conf.erb index f5b60a2d2..a4d7e53ce 100644 --- a/cookbooks/tilecache/templates/default/squid.conf.erb +++ b/cookbooks/tilecache/templates/default/squid.conf.erb @@ -41,6 +41,7 @@ acl osmtileScrapers browser Firefox\/12\.0 acl osmtileScrapers browser Firefox\/13\.0 acl osmtileScrapers browser ^Python\-urllib\/ acl osmtileScrapers browser ^python\-requests\/ +acl osmtileScrapers browser ^node\-fetch\/ acl osmtileScrapers browser ^R$ acl osmtileScrapers browser ^Java\/ acl osmtileScrapers browser ^tiles$ -- 2.39.5