Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/proxy/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,12 @@ async fn proxy_handler(State(state): State<ProxyState>, mut req: Request) -> Res
req.headers_mut().remove(&key);
}

// Downgrade the forwarded request to HTTP/1.1. TLS connections negotiate
// HTTP/2 inbound via ALPN, but the upstream forward client speaks HTTP/1 to
// the daemon. Without this, the still-h2-tagged request is rejected by the
// client with `UserUnsupportedVersion`, surfacing as a 502 to the browser.
*req.version_mut() = axum::http::Version::HTTP_11;

// Extract the client-side OnUpgrade handle *before* consuming req
let client_upgrade = hyper::upgrade::on(&mut req);

Expand Down
Loading