From aba3dd5b6845a5a09d8bcc6459fe31794e2c22a1 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 16 Dec 2019 16:57:44 -0300 Subject: [PATCH] fix(server) remove header_filter and body_filter handling for now Remove filter phases for now, because those can't be handled efficiently by the Kong side: one cannot open non-blocking sockets in `header_filter` and `body_filter` so we avoid those phases when doing Go plugins to avoid using blocking sockets. --- instance.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/instance.go b/instance.go index e5cf113..2c68879 100644 --- a/instance.go +++ b/instance.go @@ -23,8 +23,6 @@ type ( certificater interface{ Certificate(*pdk.PDK) } rewriter interface{ Rewrite(*pdk.PDK) } accesser interface{ Access(*pdk.PDK) } - headerFilter interface{ HeaderFilter(*pdk.PDK) } - bodyFilter interface{ BodyFilter(*pdk.PDK) } prereader interface{ Preread(*pdk.PDK) } logger interface{ Log(*pdk.PDK) } ) @@ -35,8 +33,6 @@ func getHandlers(config interface{}) map[string]func(kong *pdk.PDK) { if h, ok := config.(certificater); ok { handlers["certificate"] = h.Certificate } if h, ok := config.(rewriter) ; ok { handlers["rewrite"] = h.Rewrite } if h, ok := config.(accesser) ; ok { handlers["access"] = h.Access } - if h, ok := config.(headerFilter); ok { handlers["header_filter"] = h.HeaderFilter } - if h, ok := config.(bodyFilter) ; ok { handlers["body_filter"] = h.BodyFilter } if h, ok := config.(prereader) ; ok { handlers["preread"] = h.Preread } if h, ok := config.(logger) ; ok { handlers["log"] = h.Log }