iac/modules/caddy_reverse/files/Caddyfile.tftpl
Florian Maury 1b9eeb1288 blip
2025-01-10 16:10:39 +01:00

25 lines
549 B
Caddyfile

{
skip_install_trust
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
log {
output stdout
format json
}
}
%{ for vhost in vhosts ~}
${vhost.domain} {
reverse_proxy {
%{ for upstream in vhost.upstreams ~}
to https://${upstream}
transport http {
tls_server_name ${vhost.domain}
tls_insecure_skip_verify
}
%{ endfor ~}
%{ for hdr in vhost.headers_down ~}
header_down ${hdr.modifier}${hdr.name} "${hdr.value}"
%{ endfor ~}
}
}
%{ endfor ~}