tyo0/redlib: block search indexing

This commit is contained in:
Guanran Wang 2024-09-06 21:20:51 +08:00
parent 36288c8958
commit b3377dab48
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF

View file

@ -13,9 +13,17 @@ in
match = lib.singleton {
host = [ "reddit.ny4.dev" ];
};
handle = lib.singleton {
handle = [
{
# Google's indexing caused a DoS with 800k requests...
# https://developers.google.com/search/docs/crawling-indexing/block-indexing
handler = "headers";
response.set."X-Robots-Tag" = [ "noindex" ];
}
{
handler = "reverse_proxy";
upstreams = [ { dial = "localhost:${toString port}"; } ];
};
}
];
};
}