summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-08-20 21:50:48 +0200
committertv <tv@krebsco.de>2022-08-20 22:32:17 +0200
commit587015b9d7d3955d8e1c8d89ef95047078492f9a (patch)
tree0e1dbb042945c9c9ed765548498029da956cd3e2 /tv/2configs
parent4f9e6225341a273eca9866fe65911afb8b99bb41 (diff)
tv nginx: close requests with bad Host header
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/nginx/default.nix13
1 files changed, 4 insertions, 9 deletions
diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix
index b0acb9435..e68fc714f 100644
--- a/tv/2configs/nginx/default.nix
+++ b/tv/2configs/nginx/default.nix
@@ -8,18 +8,13 @@ with import <stockholm/lib>;
recommendedOptimisation = true;
recommendedTlsSettings = true;
- virtualHosts._http = {
+ virtualHosts.${toJSON ""} = {
default = true;
extraConfig = ''
- return 404;
- '';
- };
-
- virtualHosts.default = {
- locations."= /etc/os-release".extraConfig = ''
- default_type text/plain;
- alias /etc/os-release;
+ error_page 400 =444 /;
+ return 444;
'';
+ rejectSSL = true;
};
};
tv.iptables = {