Skip to content

Commit f2571be

Browse files
committed
Fixed drop headers config option crashing application
silly bug. Signed-off-by: Dave Shanley <[email protected]>
1 parent cebdc14 commit f2571be

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

daemon/handle_request.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,14 @@ func (ws *WiretapService) handleHttpRequest(request *model.Request) {
9292
responseValidator := responses.NewResponseBodyValidator(ws.docModel)
9393

9494
configStore, _ := ws.controlsStore.Get(shared.ConfigKey)
95-
9695
config := configStore.(*shared.WiretapConfiguration)
96+
97+
if config.Headers == nil || len(config.Headers.DropHeaders) == 0 {
98+
config.Headers = &shared.WiretapHeaderConfig{
99+
DropHeaders: []string{},
100+
}
101+
}
102+
97103
newReq := cloneRequest(CloneRequest{
98104
Request: request.HttpRequest,
99105
Protocol: config.RedirectProtocol,

0 commit comments

Comments
 (0)