oops - key
This commit is contained in:
@@ -47,6 +47,7 @@ MAX_WAIT=600 # maximum wait time in seconds (10 minutes)
|
||||
|
||||
# Security configuration (optional)
|
||||
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)
|
||||
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"
|
||||
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
|
||||
CURL_OPTS="$CURL_OPTS -H \"X-Forwarded-For: $X_FORWARDED_FOR\""
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user