1
0

fix: add standlone config for HTTP-01 challenge only

This commit is contained in:
Nicolas Duchon 2024-07-16 13:47:43 +02:00
parent 124b6c034c
commit b356f51ebc

@ -488,9 +488,15 @@ function update_certs {
if source /app/letsencrypt_user_data; then
for cid in "${LETSENCRYPT_STANDALONE_CERTS[@]}"; do
local -n hosts_array="LETSENCRYPT_${cid}_HOST"
for domain in "${hosts_array[@]}"; do
add_standalone_configuration "$domain"
done
local -n acme_challenge="ACME_${cid}_CHALLENGE"
acme_challenge="${acme_challenge:-HTTP-01}"
if [[ "$acme_challenge" == "HTTP-01" ]]; then
for domain in "${hosts_array[@]}"; do
add_standalone_configuration "$domain"
done
fi
done
reload_nginx
LETSENCRYPT_CONTAINERS+=( "${LETSENCRYPT_STANDALONE_CERTS[@]}" )