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:
parent
116d863018
commit
7f77bf135b
1 changed files with 0 additions and 19 deletions
|
@ -29,25 +29,6 @@ serverSystemConfiguration {
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = 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 = ''
|
appendHttpConfig = ''
|
||||||
map $scheme $hsts_header {
|
map $scheme $hsts_header {
|
||||||
https "max-age=31536000; includeSubdomains; preload";
|
https "max-age=31536000; includeSubdomains; preload";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue