From ae300a34c60b312179ac19dd885ee0ce8e209656 Mon Sep 17 00:00:00 2001 From: ManiacTwister Date: Tue, 15 Jan 2019 09:08:00 +0100 Subject: [PATCH] Use Get function to access gitlab event header to prevent crashes --- input/gitlab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/gitlab.go b/input/gitlab.go index e331968..87c62ed 100644 --- a/input/gitlab.go +++ b/input/gitlab.go @@ -174,7 +174,7 @@ func (m GitlabModule) GetHandler() http.HandlerFunc { defer req.Body.Close() decoder := json.NewDecoder(req.Body) - var eventType = req.Header["X-Gitlab-Event"][0] + var eventType = req.Header.Get("X-Gitlab-Event") type Project struct { Name string `json:"name"`