Skip to content

Commit

Permalink
Use Get function to access gitlab event header to prevent crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ManiacTwister committed Jan 15, 2019
1 parent ce4b5f8 commit ae300a3
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 ae300a3

Please sign in to comment.