Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kong golang custom plugin http2 & gRPC traffic mirroring #215

Closed
Prasad502 opened this issue Nov 4, 2024 · 1 comment
Closed

Kong golang custom plugin http2 & gRPC traffic mirroring #215

Prasad502 opened this issue Nov 4, 2024 · 1 comment

Comments

@Prasad502
Copy link

Hello ,
I have implemented a custom plugin in golang which is intended to mirror all the requests and responses and sent to a remote server. I am facing an issue with http2 & gRPC upstreams.

The request data is captured but while I receive the response from upstream server , the plugin is unable to mirror the response.

Below are the logs of kong docker. I am using the 3.8 version.

How do i solve this issue?

2024/11/02 15:12:35 [info] 2536#0: *638703 [kong] pb_rpc.lua:258 ------------- Request Data Captured --------------, client: 172.19.0.1
2024/11/02 15:12:35 [notice] 2536#0: *638703 [lua] init.lua:1358: access(): response buffering was turned off: incompatible HTTP version (2), client: 172.19.0.1
172.19.0.1 - - [02/Nov/2024:15:12:35 +0000] "POST /collector.CollectorProxy/CollectData HTTP/2.0" 200 7 "-" "grpc-node-js/1.8.13" kong_request_id: "ac4fc504fc716c65874e0b679b2aba73"

@gszr
Copy link
Member

gszr commented Jan 14, 2025

@Prasad502,

Thank you for reporting this issue!

In implementing your feature you probably used GetRawBody method, which relies on buffered proxying. Buffered proxying was unsupported for HTTP/2 requests up until Kong 3.9.0. If it was used in previous versions, you'd see the exact error message you reported. Could you retry with 3.9 and give us your feedback?

Closing this one for now, but please reopen it or create a new one.

Happy Konging! 🦍

@gszr gszr closed this as completed Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants