mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-21 07:51:26 +02:00
request_failure hook: added http response headers as new parameter
This commit is contained in:
@@ -522,7 +522,8 @@ http_request() {
|
|||||||
# An exclusive hook for the {1}-request error might be useful (e.g., for sending an e-mail to admins)
|
# An exclusive hook for the {1}-request error might be useful (e.g., for sending an e-mail to admins)
|
||||||
if [[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]]; then
|
if [[ -n "${HOOK}" ]] && [[ "${HOOK_CHAIN}" != "yes" ]]; then
|
||||||
errtxt="$(cat ${tempcont})"
|
errtxt="$(cat ${tempcont})"
|
||||||
"${HOOK}" "request_failure" "${statuscode}" "${errtxt}" "${1}"
|
errheaders="$(cat ${tempheaders})"
|
||||||
|
"${HOOK}" "request_failure" "${statuscode}" "${errtxt}" "${1}" "${errheaders}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "${tempcont}"
|
rm -f "${tempcont}"
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ invalid_challenge() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
request_failure() {
|
request_failure() {
|
||||||
local STATUSCODE="${1}" REASON="${2}" REQTYPE="${3}"
|
local STATUSCODE="${1}" REASON="${2}" REQTYPE="${3}" HEADERS="${4}"
|
||||||
|
|
||||||
# This hook is called when an HTTP request fails (e.g., when the ACME
|
# This hook is called when an HTTP request fails (e.g., when the ACME
|
||||||
# server is busy, returns an error, etc). It will be called upon any
|
# server is busy, returns an error, etc). It will be called upon any
|
||||||
|
|||||||
Reference in New Issue
Block a user