Repository navigation
feat: add per-request reverse proxy for bridged routes - #30399
Merged
Merged
Conversation
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
5 times, most recently
from
October 7, 2026 10:26
ed49523 to
1885657
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 2, 2026 09:25
91a8821 to
d6b4039
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
2 times, most recently
from
November 2, 2026 11:09
e3e8d44 to
b7a42c3
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
2 times, most recently
from
November 2, 2026 14:08
96696d2 to
9cc031c
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
from
November 2, 2026 14:08
b7a42c3 to
251caf9
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 2, 2026 14:18
9cc031c to
ee4f79b
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
2 times, most recently
from
November 2, 2026 15:26
8e4a533 to
bc7f1aa
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 2, 2026 15:26
ee4f79b to
265559d
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
from
November 2, 2026 15:58
bc7f1aa to
8e49622
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 2, 2026 15:58
265559d to
3821aa8
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
from
November 3, 2026 10:07
8e49622 to
27faaf1
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 3, 2026 10:07
3821aa8 to
0aeb5f3
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
from
November 3, 2026 10:32
27faaf1 to
a64f6ec
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
2 times, most recently
from
November 3, 2026 10:47
9b66ac7 to
5a06934
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
2 times, most recently
from
November 3, 2026 11:19
432734b to
a3ecaaf
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
2 times, most recently
from
November 3, 2026 13:42
a87c0f9 to
4af3458
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
from
November 3, 2026 13:42
a3ecaaf to
3a3adc3
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 3, 2026 14:11
4af3458 to
530802e
Compare
pawbana
force-pushed
the
pawel/issue-29726-request-replay
branch
2 times, most recently
from
November 9, 2026 09:29
830e62d to
26b5be9
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 9, 2026 09:29
852c31c to
07dc3bb
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 9, 2026 10:57
7655635 to
230ef35
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 9, 2026 13:44
230ef35 to
c090337
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 9, 2026 16:24
bb19f08 to
8f50493
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
2 times, most recently
from
November 9, 2026 19:00
1d2e4a9 to
b257f3b
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 9, 2026 20:05
b257f3b to
ae29002
Compare
pawbana
force-pushed
the
pawel/issue-29726-wire-forwarding
branch
from
November 9, 2026 20:32
ae29002 to
cdf0a37
Compare
pawbana
marked this pull request as ready for review
November 9, 2026 20:37
ssncferreira
approved these changes
Nov 11, 2026
| // HTTP/1 handlers must enable full duplex, or the server will drain the body before an early reply. | ||
| func NewRequest(r *http.Request) *TeeBuffer { | ||
| func NewRequest(in *http.Request) (*http.Request, *TeeBuffer) { | ||
| r := *in |
Collaborator
There was a problem hiding this comment.
nit:
Suggested change
| r := *in | |
| request := *in |
Collaborator
Author
There was a problem hiding this comment.
renamed r -> req and resp in NewRequest and NewResponse accordingly.
| }, | ||
| Transport: h.transport, | ||
| FlushInterval: -1, | ||
| ErrorLog: h.errorLog, |
Collaborator
Collaborator
Author
There was a problem hiding this comment.
It is added later in the stack, PR still in draft but should be added here: https://github.com/coder/coder/pull/30226/changes#diff-fd84ed5f2d4fee4567d1827c1838f33705be295054c9ee169a00b7df4b893ed0R283-R293
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepare
forwardingHandlerto forward bridged requests to the provider. Nothing calls it yet.newForwardingHandlerparses the provider base URL.NewRouternow fails on a malformed URL. It also builds one transport per provider, with API dump support.newProxybuilds anhttputil.ReverseProxyfor each request. Each proxy shares the handler's transport. The proxy sends the request to the provider base URL, keeps the client's escaped path and raw query, and forwards the client's BYOK key. Key pools will be added in feat(aibridge/x/proxy): integrate key-pool failover #30400.One change to
replaybodyreplaybody.NewRequestreturns a copy of the request instead of changing the caller's.Generated by Coder Agents on behalf of @pawbana.