Skip to content

Commit 1503797

Browse files
LupulScIT-Raphael
authored andcommitted
LE API: Use long-form curl args and enable location redir
1 parent c0b28ff commit 1503797

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ query_le_v2() {
5555
# Save http response to file passed as "$4" arg or print to stdout if not provided
5656
# http response headers are always sent to stdout
5757
local save_to_file=${4:-"/dev/stdout"}
58-
curl -k --retry 5 --retry-connrefused --silent --dump-header /dev/stdout --data "$post_data" "$1" --header "$content" --output "$save_to_file"
58+
curl --location --insecure --retry 5 --retry-connrefused --silent --dump-header /dev/stdout --data "$post_data" "$1" --header "$content" --output "$save_to_file"
5959
debug_log "API call" "exit status: $?"
6060
}
6161

@@ -430,7 +430,7 @@ done
430430

431431
# Fallback on depreciated download method for certs (unauthenticated GET)
432432
if [[ $status != 200 ]]; then
433-
answer=$(curl -k --retry 5 --retry-connrefused --silent --dump-header /dev/stdout "$certificate" --output "$ssl_dir/$domain.pem")
433+
answer=$(curl --insecure --retry 5 --retry-connrefused --silent --dump-header /dev/stdout "$certificate" --output "$ssl_dir/$domain.pem")
434434
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
435435

436436
debug_log "Step 7 - Fallback" "- status: ${status}\n- answer: ${answer}"

0 commit comments

Comments
 (0)