iac/modules/caddy_reverse/files/Caddyfile.tftpl

26 lines
549 B
Caddyfile
Raw Normal View History

2025-01-10 15:10:39 +00:00
{
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 ~}