• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 20824141899
50%

Build:
DEFAULT BRANCH: main
Ran 08 Jan 2026 04:36PM UTC
Jobs 1
Files 426
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jan 2026 04:34PM UTC coverage: 50.075% (+0.08%) from 49.997%
20824141899

push

github

web-flow
Add X-Forwarded-Prefix support for SSE endpoint URL rewriting (#3210)

* 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>

*... (continued)

159 of 206 new or added lines in 11 files covered. (77.18%)

2 existing lines in 1 file now uncovered.

29020 of 57953 relevant lines covered (50.08%)

58.51 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% pkg/runner/runner.go
1
53.97
-1.3% pkg/transport/proxy/transparent/transparent_proxy.go
3
80.0
pkg/transport/proxy/transparent/response_processor.go
4
8.55
-0.06% cmd/thv/app/proxy.go
4
24.75
0.09% cmd/thv/app/run_flags.go
4
0.0
0.0% pkg/transport/factory.go
4
12.74
-0.24% pkg/transport/http.go
5
58.88
-0.47% pkg/runner/config_builder.go
21
86.18
pkg/transport/proxy/transparent/sse_response_processor.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
69.23
-2.2% pkg/vmcp/k8s/manager.go
Jobs
ID Job ID Ran Files Coverage
1 20824141899.1 08 Jan 2026 04:36PM UTC 426
50.08
GitHub Action Run
Source Files on build 20824141899
  • Tree
  • List 426
  • Changed 16
  • Source Changed 14
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20824141899
  • 8e8af3b1 on github
  • Prev Build on main (#20823065186)
  • Next Build on main (#20830646779)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc