Skip to content

Commit

Permalink
Merge pull request #38 from ManiacTwister/patch-header
Browse files Browse the repository at this point in the history
Use Get function to access gitlab event header to prevent crashes
  • Loading branch information
fleaz authored Jan 17, 2019
2 parents ce4b5f8 + ae300a3 commit 801ba74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion input/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 801ba74

Please sign in to comment.