caddy-proxy: I have a feeling the snippet import thingy is not working

This commit is contained in:
Erwin Boskma 2024-05-07 17:15:09 +02:00
parent 06ec14e84f
commit c5a83f0943
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk

View file

@ -22,11 +22,18 @@ let
};
};
cloudflare-tls = ''
tls {
dns cloudflare {env.CF_API_TOKEN}
propagation_timeout -1
}
'';
mkProxyHost = target: {
extraConfig = ''
reverse_proxy ${target}
import cloudflare-tls
${cloudflare-tls}
'';
};
@ -42,7 +49,7 @@ let
error "Nope." 403
}
import cloudflare-tls
${cloudflare-tls}
'';
};
in
@ -65,14 +72,7 @@ in
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
extraConfig = ''
(cloudflare-tls) {
tls {
dns cloudflare {env.CF_API_TOKEN}
propagation_timeout -1
}
}
'';
extraConfig = '''';
virtualHosts = builtins.listToAttrs (
map (