Dears,
I have a custom plugin where I want to adjust upstream response (call…enable_buffering(), and adding json to http response during body_filter phase).
I created new route and upstream to handle HTTPS endpoints, but kong is triggering an error when I try to test my api through kong proxy:I got following error:
buffered proxying cannot currently be enabled with http/2, please use http/1.x instead, client: 172.18.0.1, server: kong, request: "GET /api/target?roomName=1…
It seems my curl command uses by default http2 when calling https request.
please how can I proxy https request through kong and adjust upstream response accordingly?
find below more details:
kong error: buffered proxying cannot currently be enabled with http/2, please use http/1.x
#route → service
/api/target/-> /upstreamService
#https request not working through kong
curl -kv --get --location ‘https://localhost:8443/api/target?roomName=1’
server logs:
/kong/plugins/custom-auth/handler.lua:105: buffered proxying cannot currently be enabled with http/2, please use http/1.x instead, client: 172.18.0.1, server: kong, request: "GET /api/target?roomName=1
#https working request , forcing http1.1:
curl --get -kv --location --http1.1 ‘https://localhost:8443/api/target?roomName=1’
result success response 200
#enable buffering in access phase
kong.service.request.enable_buffering()
Thank you,