diff --git a/main.go b/main.go index 10c467bfec56467bc4da33661a4d2c3ea30cbf52..daf227af2961699439730dc83d771c61ca32aead 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 {