Skip to content

Commit b6e8e28

Browse files
authored
Merge pull request #7 from FireTail-io/fix-null-headers
Fix null headers array with non-nil default
2 parents 9150a21 + ca22a46 commit b6e8e28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

firetail/record.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ func (r *Record) getLogEntryRequest() (*LogEntryRequest, error) {
4646
URI: "https://" + apiGatewayV1Request.RequestContext.DomainName + apiGatewayV1Request.RequestContext.Path,
4747
Resource: apiGatewayV1Request.Resource,
4848
}
49+
if logEntryRequest.Headers == nil {
50+
logEntryRequest.Headers = map[string][]string{}
51+
}
4952
for header, value := range apiGatewayV1Request.Headers {
5053
_, hasValues := logEntryRequest.Headers[header]
5154
if hasValues {

0 commit comments

Comments
 (0)