From 39e06c51618450448d136ef3d0d60509359b4d31 Mon Sep 17 00:00:00 2001 From: buchtioof <48603083+buchtioof@users.noreply.github.com> Date: Thu, 19 Feb 2026 17:14:48 +0100 Subject: [PATCH] v0.1.4 security update --- alfred.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alfred.sh b/alfred.sh index 1654a07..f1e329f 100755 --- a/alfred.sh +++ b/alfred.sh @@ -6,6 +6,7 @@ export LANG=C ########## MAIN VARIABLES ########## DATE=$(date +'%Y-%m-%d_%H:%M:%S') TARGET=${1:-localhost:8000} +API_KEY=${2:-} ########## TEMPORARY WORKING REPERTORY ########## export PATH="$(pwd)/bin:$PATH" @@ -115,9 +116,10 @@ json_pkg() { ) curl -X POST "http://$TARGET/endpoint" \ + -H "X-API-Key: $API_KEY" \ -H "Content-Type: application/json" \ -d "$json_data" \ - --connect-timeout 5 || echo "Erreur: Serveur $TARGET injoignable." + --connect-timeout 5 || echo "[ERROR]: $TARGET server not found." echo "" }