diff options
author | Martin Fischer <martin@push-f.com> | 2025-03-09 19:55:25 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2025-03-09 20:20:56 +0100 |
commit | 4602b8aa1ccc761af2b0843d6df9732ce9870f19 (patch) | |
tree | c15df880e3a349370aa6659145ef40e143a6fe21 | |
parent | de57db8d64eb4de42a49882642152aaf13b34cad (diff) |
fix(tente): close the connection for unknown Host headers
-rw-r--r-- | nixos/hosts/tente/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix index 5d1bce9..c2b6491 100644 --- a/nixos/hosts/tente/default.nix +++ b/nixos/hosts/tente/default.nix @@ -100,6 +100,19 @@ in nginx = { enable = true; group = "www-data"; + + appendHttpConfig = '' + # Close the connection for unknown Host headers. + # If we don't do this nginx serves some random virtualhost. + server { + listen 80 default_server; + listen [::]:80 default_server; + listen 443 ssl default_server; + listen [::]:443 ssl default_server; + ssl_reject_handshake on; + return 444; + } + ''; }; }; |