diff --git a/.gitignore b/.gitignore index 485d046..4ff1110 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ coverage test *.dkim.key + +caddy diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..b2351bf --- /dev/null +++ b/Caddyfile @@ -0,0 +1,24 @@ +# download caddy. +# +# wget "https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=73105841751083" -O caddy; chmod 755 caddy; +# +# This is the global config for all sites defined in this Caddyfile. +{ + # https://caddyserver.com/docs/caddyfile/options#on-demand-tls + on_demand_tls { + ask http://localhost:6001/ask-for-on-demand-tls + interval 2m + burst 5 + } + #log { + # output file out.log + # level DEBUG + #} +} + +https:// { + tls { + on_demand + } + reverse_proxy localhost:6001 +}