fix(core): strip trailing slashes when normalizing auth and MCP resource URLs (#506)

* fix(core): strip trailing slashes when normalizing auth and MCP resource URLs

* docs: document BETTER_AUTH_URL in README and quickstart guides

* docs: prioritize AWS_ENDPOINT_URL_S3 and clarify applicability to local storage

* docs: refine AWS_ENDPOINT_URL_S3 guidance for local storage deployments
This commit is contained in:
Yiling-J
2026-10-29 17:24:31 +08:00
committed by GitHub
parent baf30730af
commit 687b5a79d8
15 changed files with 206 additions and 72 deletions
@@ -50,6 +50,10 @@ describe('MCP server OAuth 2.1 & Dual Auth', () => {
it('serves RFC 8414 and RFC 9728 discovery endpoints', async () => {
// RFC 9728 Protected Resource Metadata
expect(authBaseUrl.endsWith('/')).toBe(false)
expect(mcpResource).not.toContain('//mcp')
expect(mcpResource.endsWith('/mcp')).toBe(true)
const resourceMetaRes = await app.request('/.well-known/oauth-protected-resource')
expect(resourceMetaRes.status).toBe(200)
const resourceMeta = await resourceMetaRes.json()