From 7f77bf135b9c92b809db16daf4d20230ff0f5f1b Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 16 Jan 2024 16:12:00 +0300 Subject: [PATCH] We don't use CF anymore --- hosts/cube/nginx.nix | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/hosts/cube/nginx.nix b/hosts/cube/nginx.nix index 0fb17da..045e3b1 100644 --- a/hosts/cube/nginx.nix +++ b/hosts/cube/nginx.nix @@ -29,25 +29,6 @@ serverSystemConfiguration { recommendedProxySettings = true; recommendedTlsSettings = true; - commonHttpConfig = let - fileToList = file: lib.splitString "\n" (builtins.readFile file); - - cloudflareIpsV4 = fileToList (pkgs.fetchurl { - url = "https://www.cloudflare.com/ips-v4"; - sha256 = "0ywy9sg7spafi3gm9q5wb59lbiq0swvf0q3iazl0maq1pj1nsb7h"; - }); - cloudflareIpsV6 = fileToList (pkgs.fetchurl { - url = "https://www.cloudflare.com/ips-v6"; - sha256 = "1ad09hijignj6zlqvdjxv7rjj8567z357zfavv201b9vx3ikk7cy"; - }); - - realIpsFromList = lib.concatMapStringsSep "\n" (ip: "set_real_ip_from ${ip};"); - in '' - ${realIpsFromList cloudflareIpsV4} - ${realIpsFromList cloudflareIpsV6} - real_ip_header CF-Connecting-IP; - ''; - appendHttpConfig = '' map $scheme $hsts_header { https "max-age=31536000; includeSubdomains; preload";