diff --git a/api/pkg/filtermanager/filtermanager.go b/api/pkg/filtermanager/filtermanager.go index 17a9134e..f9feb707 100644 --- a/api/pkg/filtermanager/filtermanager.go +++ b/api/pkg/filtermanager/filtermanager.go @@ -334,7 +334,7 @@ func (m *filterManager) localReply(v *api.LocalResponse, decoding bool) { } func (m *filterManager) DecodeHeaders(headers capi.RequestHeaderMap, endStream bool) capi.StatusType { - if !supportGettingHeadersOnLog && m.DebugModeEnabled() { + if !supportGettingHeadersOnLog { // Ensure the headers are cached on the Go side. headers.Get("test") headers := &filterManagerRequestHeaderMap{ @@ -696,7 +696,7 @@ func (m *filterManager) DecodeTrailers(trailers capi.RequestTrailerMap) capi.Sta } func (m *filterManager) EncodeHeaders(headers capi.ResponseHeaderMap, endStream bool) capi.StatusType { - if !supportGettingHeadersOnLog && m.DebugModeEnabled() { + if !supportGettingHeadersOnLog { // Ensure the headers are cached on the Go side. headers.Get("test") m.rspHdr = headers diff --git a/plugins/tests/integration/debug_mode_test.go b/plugins/tests/integration/debug_mode_test.go index e729255f..2bf15e16 100644 --- a/plugins/tests/integration/debug_mode_test.go +++ b/plugins/tests/integration/debug_mode_test.go @@ -68,7 +68,7 @@ func TestDebugModeSlowLog(t *testing.T) { pass := time.Since(now) assert.Equal(t, 200, resp.StatusCode) // delay time plus the req time - assert.True(t, pass < 55*time.Millisecond, pass) + assert.True(t, pass < 60*time.Millisecond, pass) } func TestDebugModeSlowLogNoPlugin(t *testing.T) { @@ -243,7 +243,7 @@ func TestDebugModeSlowLogWithFiltersFromConsumer(t *testing.T) { pass := time.Since(now) assert.Equal(t, 200, resp.StatusCode) // delay time plus the req time - assert.True(t, pass < 55*time.Millisecond, pass) + assert.True(t, pass < 60*time.Millisecond, pass) }, }, }