(source of the .htaccess: https://github.com/PrivateBin/PrivateBin/blob/master/.htaccess.disabled)
Put this into your http
context:
map $http_user_agent $pastebin_badagent {
~*bot 1;
~*spider 1;
~*crawl 1;
~https?:// 1;
WhatsApp 1;
SkypeUriPreview 1;
facebookexternalhit 1;
}
And this into your privatebin's server
context:
if ($pastebin_badagent) {
return 403;
}