Repository navigation
Disable /reflect endpoints - #16411
Merged
Merged
Conversation
Co-authored-by: lpcox <[email protected]>
Copilot
AI
changed the title
[WIP] Disable /reflect and return HTTP 404
Disable Nov 12, 2026
/reflect endpoints
lpcox
marked this pull request as ready for review
November 12, 2026 17:42
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review reports no active issues with the change disabling MCP Gateway reflection endpoints.
No open issues 🎉
What changed in this PR
Disables MCP Gateway’s reflection endpoints across unified, routed, and proxy modes, addressing #16410 while preserving health and readiness behavior.
Changes:
- Removes gateway
/reflectregistration and returns 404 for proxy reflection paths, including/api/v3/reflect, before policy handling. - Updates route tests to expect 404 and retains health checks.
- Removes reflection endpoint documentation and obsolete handler tests.
| File | Description |
|---|---|
| README.md | Removes reflection endpoint documentation and response schema. |
| internal/server/reflect_test.go | Checks 404 in both gateway modes and confirms /health remains available. |
| internal/server/handlers.go | Removes the reflection handler and route registration. |
| internal/server/handle_health_reflect_test.go | Removes reflection handler tests while retaining health tests. |
| internal/proxy/handler.go | Returns 404 for normalized reflection paths before policy handling. |
| internal/proxy/handler_test.go | Checks both reflection paths in normal and read-only proxy modes. |
| internal/difc/reflect.go | Updates the snapshot type’s comment without changing behavior. |
| docs/PROXY_MODE.md | Removes proxy reflection endpoint documentation. |
Review effort: Balanced (auto)
This was referenced Nov 12, 2026
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.
Disable mcpg’s
/reflectendpoint across unified and routed gateway modes and proxy mode, including/api/v3/reflect. Preserve/healthand existing readiness behavior.curl -i http://localhost:8080/reflect curl -i http://localhost:8080/api/v3/reflect # Both return 404 Not Found