mirror of
https://github.com/buchtioof/alfred.git
synced 2026-05-02 09:33:27 +02:00
v0.1.4 security update
This commit is contained in:
parent
47d8ac2544
commit
39e06c5161
@ -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 ""
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user