prevent hostless access

This commit is contained in:
Reid 2024-06-21 22:53:37 -07:00
parent 65ced5335c
commit f8de5f317f

View file

@ -107,6 +107,14 @@ in {
${realIpsFromList cfipv6} ${realIpsFromList cfipv6}
real_ip_header CF-Connecting-IP; real_ip_header CF-Connecting-IP;
''; '';
# prevent leaking domain through direct ip access or no host
# generally a good idea to keep this
virtualHosts."_"= {
default = true;
rejectSSL = true;
locations."/".return = 444;
};
}; };
networking.firewall.allowedTCPPorts = [ 443 80 ]; networking.firewall.allowedTCPPorts = [ 443 80 ];