Skip to content

Commit

Permalink
fix: add standlone config for HTTP-01 challenge only
Browse files Browse the repository at this point in the history
  • Loading branch information
buchdag committed Jul 16, 2024
1 parent 3b1638f commit d0d37ae
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/letsencrypt_service
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}" )
Expand Down

0 comments on commit d0d37ae

Please sign in to comment.