1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

We don't use CF anymore

This commit is contained in:
RGBCube 2024-01-16 16:12:00 +03:00
parent 116d863018
commit 7f77bf135b
No known key found for this signature in database

View file

@ -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";