Skip to content

Commit

Permalink
Fixed drop headers config option crashing application
Browse files Browse the repository at this point in the history
silly bug.

Signed-off-by: Dave Shanley <dave@quobix.com>
  • Loading branch information
daveshanley committed Jul 10, 2023
1 parent cebdc14 commit f2571be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion daemon/handle_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ func (ws *WiretapService) handleHttpRequest(request *model.Request) {
responseValidator := responses.NewResponseBodyValidator(ws.docModel)

configStore, _ := ws.controlsStore.Get(shared.ConfigKey)

config := configStore.(*shared.WiretapConfiguration)

if config.Headers == nil || len(config.Headers.DropHeaders) == 0 {
config.Headers = &shared.WiretapHeaderConfig{
DropHeaders: []string{},
}
}

newReq := cloneRequest(CloneRequest{
Request: request.HttpRequest,
Protocol: config.RedirectProtocol,
Expand Down

0 comments on commit f2571be

Please sign in to comment.