From f9b7abd0b01bb8bf91407bbe02144e6ebcee1d7e Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Wed, 27 Dec 2023 19:26:29 +0100 Subject: [PATCH] Use DNS challenge for non-production --- roles/proxy/templates/caddy/Caddyfile.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/proxy/templates/caddy/Caddyfile.j2 b/roles/proxy/templates/caddy/Caddyfile.j2 index 005e29c..f09ba0c 100644 --- a/roles/proxy/templates/caddy/Caddyfile.j2 +++ b/roles/proxy/templates/caddy/Caddyfile.j2 @@ -66,7 +66,13 @@ xmr.local.{{ proxy_vars[env].app01.apps_base_domain }} { } cloud.{{ proxy_vars[env].app01.apps_base_domain }} { +{% if env == 'production' %} tls {{ tls_email }} +{% else %} + tls {{ tls_email }} { + dns njalla {{ njalla_api_token }} + } +{% endif %} header { Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"