feat: read token from header in http/sse mode #89
Reference in New Issue
Block a user
No description provided.
Delete Branch ":main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
this PR introduces support for per-request authentication tokens in HTTP and SSE modes. The server now inspects incoming requests for an
Authorization: Bearer <token>
header.Previously, the server operated with a single, globally configured Gitea token. This change allows different clients to use their own tokens when communicating with the MCP server, enhancing security and flexibility.
To support this, the Gitea API client initialization has been refactored:
ClientFromContext
function creates a Gitea client on-demand, using a token from the request context if available, and falling back to the globally configured token otherwise.The README has also been updated to reflect the new configuration option.
Update: #59