From 9a0c3ed63154af757d21978cd6c7e9e5967eda32 Mon Sep 17 00:00:00 2001 From: Massimiliano Adamo <maxadamo@gmail.com> Date: Thu, 1 Sep 2022 14:05:45 +0200 Subject: [PATCH] test --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 10c467b..daf227a 100644 --- a/main.go +++ b/main.go @@ -79,7 +79,8 @@ func triggerPuppet(w http.ResponseWriter, req *http.Request) { unauthorizedMsg := fmt.Sprintln("{\n \"status\": \"Unauthorized\",\n \"response\": 401\n}") unavailableMsg := fmt.Sprintln("{\n \"status\": \"KO\",\n \"response\": 503\n}") - w.Header().Set("Content-Type", "application/json") + req.Header.Add("Content-Type", "application/json") + //w.Header().Set("Content-Type", "application/json") if authToken != bearerToken { http.Error(w, unauthorizedMsg, http.StatusUnauthorized) } else { -- GitLab