oops - key

This commit is contained in:
pratik
2025-10-22 11:25:27 -05:00
parent f1910b36cb
commit b395b310e1

View File

@@ -47,6 +47,7 @@ MAX_WAIT=600 # maximum wait time in seconds (10 minutes)
# Security configuration (optional) # Security configuration (optional)
CERT_FILE="" # Path to client certificate file (leave empty to skip) CERT_FILE="" # Path to client certificate file (leave empty to skip)
KEY_FILE="" # Path to client private key file (leave empty to skip)
X_FORWARDED_FOR="" # X-Forwarded-For header value (leave empty to skip) X_FORWARDED_FOR="" # X-Forwarded-For header value (leave empty to skip)
MY_APIM_KEY="" # My-APIM-KEY header value (leave empty to skip) MY_APIM_KEY="" # My-APIM-KEY header value (leave empty to skip)
@@ -105,6 +106,14 @@ if [ -n "$CERT_FILE" ]; then
CURL_OPTS="$CURL_OPTS --cert $CERT_FILE" CURL_OPTS="$CURL_OPTS --cert $CERT_FILE"
fi fi
if [ -n "$KEY_FILE" ]; then
if [ ! -f "$KEY_FILE" ]; then
log_error "Key file not found: $KEY_FILE"
exit 1
fi
CURL_OPTS="$CURL_OPTS --key $KEY_FILE"
fi
if [ -n "$X_FORWARDED_FOR" ]; then if [ -n "$X_FORWARDED_FOR" ]; then
CURL_OPTS="$CURL_OPTS -H \"X-Forwarded-For: $X_FORWARDED_FOR\"" CURL_OPTS="$CURL_OPTS -H \"X-Forwarded-For: $X_FORWARDED_FOR\""
fi fi