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 124b6c0 commit b356f51
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 b356f51

Please sign in to comment.