reject HTTP nicely

This commit is contained in:
nora 2024-08-05 20:39:59 +02:00
parent 67c6a7f9a0
commit bce3c7ca65
2 changed files with 6 additions and 2 deletions

View file

@ -24,8 +24,6 @@
}
}
# TODO: compression?
www.noratrieb.dev {
redir https://noratrieb.dev{uri} permanent
}

View file

@ -1,5 +1,6 @@
{ pkgs, config, lib, name, website, slides, blog, ... }: {
networking.firewall.allowedTCPPorts = [
80
443
];
@ -11,6 +12,11 @@
''
{
email nilstrieb@proton.me
auto_https disable_redirects
}
http:// {
respond "This is an HTTP-only server, silly you. Go to https:// instead." 400
}
${config.networking.hostName}.infra.noratrieb.dev {