Skip to content

Commit

Permalink
Make it work with Amazon ES 5.1 and Kibana 5.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
abutaha committed Feb 2, 2017
1 parent 00cc635 commit 3d22a4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws-es-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

// Workaround for ES 5.1 and Kibana 5.1.1
if val, ok := r.Header["Kbn-Version"]; ok {
req.Header.Set("Kbn-Version", val[0])
}

// Sign the request with AWSv4
payload := bytes.NewReader(replaceBody(req))
p.Signer.Sign(req, payload, p.Service, p.Region, time.Now())
Expand Down

0 comments on commit 3d22a4e

Please sign in to comment.