ref(upstream): Forward envelopes to the advertised upstream#5844
ref(upstream): Forward envelopes to the advertised upstream#5844
Conversation
d3bfdea to
4ee2238
Compare
2817666 to
65b2f59
Compare
65b2f59 to
a19b2de
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a19b2de. Configure here.
| let url = request | ||
| .upstream() | ||
| .unwrap_or_else(|| self.config.upstream()) | ||
| .get_url(request.path().as_ref()); |
There was a problem hiding this comment.
Host header not updated for overridden upstream
High Severity
When a request provides an upstream override, the URL is correctly resolved from the overridden UpstreamDescriptor, but the Host header fallback still always uses self.config.upstream().host(). This means requests routed to a different upstream will carry the wrong Host header, which can cause routing failures at the target server in production where hosts differ. The fallback in host_header needs to also consider request.upstream().
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a19b2de. Configure here.
There was a problem hiding this comment.
Same as on the Sentry one: I actually kept this for now on purpose, didn't see a reason to override it.
loewenheim
left a comment
There was a problem hiding this comment.
This is without having read the proxy testing logic in detail.
Co-authored-by: Sebastian Zivota <loewenheim@users.noreply.github.com>


Implements forwarding of envelopes to the advertised upstream of an upstream Relay.
This adds some integration test machinery to allow observing http requests (
mini_proxy).