Decouple response processing out of transparent proxy#3216
Merged
dmjb merged 2 commits intoproxy-headerfrom Jan 7, 2026
Merged
Decouple response processing out of transparent proxy#3216dmjb merged 2 commits intoproxy-headerfrom
dmjb merged 2 commits intoproxy-headerfrom
Conversation
In order to minimize the amount of transport-specific logic in the transparent proxy, create a response processor interface and put the new SSE rewrite logic behind that interface. Create a no-op implementation for HTTP streamable.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## proxy-header #3216 +/- ##
================================================
+ Coverage 57.29% 57.31% +0.02%
================================================
Files 347 349 +2
Lines 34567 34594 +27
================================================
+ Hits 19805 19829 +24
- Misses 13119 13123 +4
+ Partials 1643 1642 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
amirejaz
added a commit
that referenced
this pull request
Jan 8, 2026
* Add X-Forwarded-Prefix support for SSE endpoint URL rewriting Implement SSE endpoint URL rewriting in the TransparentProxy to support path-based ingress routing that strips path prefixes. Changes: - Add endpointPrefix and trustProxyHeaders fields to TransparentProxy - Add sseRewriteConfig type for holding rewrite configuration - Add getSSERewriteConfig() to determine rewrite config with priority: 1. Explicit endpointPrefix (highest priority) 2. X-Forwarded-Prefix header (when trustProxyHeaders is true) 3. No rewriting (default) - Add rewriteEndpointURL() to handle both relative and absolute URLs - Refactor SSE response processing with sseLineProcessor struct - Only rewrite "event: endpoint" events, pass others unchanged - Preserve existing session ID extraction functionality Fixes #3071 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add EndpointPrefix to transport and runner config structs Wire the endpointPrefix configuration through the transport layer: - Add EndpointPrefix to transport.Config struct - Add EndpointPrefix to runner.RunConfig struct - Update HTTPTransport to accept and pass endpointPrefix to proxy - Update factory.go to pass EndpointPrefix from config - Update runner.go to include EndpointPrefix in transport config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add --endpoint-prefix CLI flag to thv run command Add CLI support for specifying the SSE endpoint URL prefix: - Add EndpointPrefix field to RunFlags struct - Add --endpoint-prefix flag with help text - Add validation to ensure prefix starts with '/' when provided - Add WithEndpointPrefix builder option in config_builder.go 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add endpointPrefix field to MCPServer and MCPRemoteProxy CRDs Add Kubernetes CRD support for configuring SSE endpoint URL prefix: - Add EndpointPrefix field to MCPServerSpec and MCPRemoteProxySpec - Wire field through controllers to runner config - Regenerate CRD manifests with operator-generate/operator-manifests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add documentation for SSE endpoint URL rewriting feature - Regenerate CLI docs with new --endpoint-prefix flag - Add SSE Endpoint URL Rewriting section to transport architecture doc - Document priority order, CLI usage, and Kubernetes CRD examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * bump chart version * add an e2e test case * fix lint/compiler issue * Decouple response processing out of transparent proxy (#3216) In order to minimize the amount of transport-specific logic in the transparent proxy, create a response processor interface and put the new SSE rewrite logic behind that interface. Create a no-op implementation for HTTP streamable. * oeprator crd version bump --------- Co-authored-by: Jakub Hrozek <jakub@stacklok.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: amirejaz <amir@stacklok.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In order to minimize the amount of transport-specific logic in the transparent proxy, create a response processor interface and put the new SSE rewrite logic behind that interface. Create a no-op implementation for HTTP streamable.