sin0/redlib: add settings
This commit is contained in:
parent
46ad3cad7e
commit
31d6a1ec80
1 changed files with 11 additions and 12 deletions
|
@ -9,19 +9,18 @@ in
|
|||
address = "127.0.0.1";
|
||||
};
|
||||
|
||||
systemd.services."redlib".environment = {
|
||||
# Google's indexing caused a DoS with 800k requests...
|
||||
# https://developers.google.com/search/docs/crawling-indexing/block-indexing
|
||||
REDLIB_ROBOTS_DISABLE_INDEXING = "on";
|
||||
REDLIB_DEFAULT_USE_HLS = "on";
|
||||
};
|
||||
|
||||
services.caddy.settings.apps.http.servers.srv0.routes = lib.singleton {
|
||||
match = lib.singleton { host = [ "reddit.ny4.dev" ]; };
|
||||
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}"; } ];
|
||||
}
|
||||
];
|
||||
handle = lib.singleton {
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = "localhost:${toString port}"; } ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue