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
reverse_proxy with h2c http transport not working when client requests using http1.1 #4777
Comments
I think the incoming/original request protocol also has to be HTTP/2. I'm not sure we've had a request yet for it to support HTTP/1.1 downstream and upconvert to 2 going upstream. Can you try with an incoming HTTP/2 request and make sure it works? If so, I can prepare a branch I would like you to try that could solve it. |
When requesting with http2 it works flawlessly. It would be extremely awesome if the conversion from http1.1 to http2 for upstream would work. Thanks so much! |
@linaGirl Also, what is your use case? We think that's important when weighing decisions about features. We haven't heard of anyone needing to upconvert HTTP/1.1 to H2C before. |
Thank you so much @mholt I will test PR #4778 tomorrow. TLS needs to be supported for the incoming requests though. The use case is: there is a service mesh for a web app that communicates using h2c. There are some public h2c services that need to be accessed by browsers. There is thus the need to convert incoming http1.1 and h2 requests to h2c. This was done using envoy in the past. We decided to switch to caddy because of the very straightforward and easy to maintain config and the automatic certificate generation. Since caddy provides the option to configure the http transport for the revers_proxy we were thinking that any incoming request protocol could be forwarded to whatever transport is configured. but i can see that h2c may be a bit of an edgecase ... |
Caddy version: v2.5.1
I'm trying to send incoming requests to a h2c upstream server. This doesn't work if the client is using HTTP1.1 only. Caddy sends a HTTP1.1 request to the upstream server while it should use h2c. Did i miss something about how this is supposed to work or is the config not correct?
Caddyfile
Logs
The text was updated successfully, but these errors were encountered: