Fix: /heath for http, sse #225
Merged
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.
This pull request refactors the health check endpoint implementation by moving it from the OAuth endpoint manager to the main server service. The health endpoint is now always available, independent of OAuth configuration, and its response has been expanded to include additional fields. Corresponding tests and endpoint documentation have been updated to reflect these changes.
Health Endpoint Refactor:
/health
endpoint and its handler have been removed fromEndpointManager
ininternal/auth/oauth/endpoints.go
, and all related tests have been deleted or updated. [1] [2] [3] [4] [5]healthHandler
is implemented inService
(internal/server/server.go
), making the health endpoint always available regardless of OAuth configuration. The handler now returns additional fields:version
andtransport
alongsidestatus
and OAuth info.Server Routing and Documentation Updates:
/health
endpoint is registered in both HTTP and SSE servers, and routing logic is updated so/health
is always handled and documented in 404 responses. Endpoint descriptions are updated to include/health
. [1] [2] [3] [4] [5] [6] [7]Test Updates:
/health
endpoint to return a healthy status and the new response format, including checks forversion
,transport
, and OAuth fields. [1] [2] [3] [4] [5] [6]