Return 404 JSON for oauth-protected-resource discovery probes.

Stop 302ing Claude well-known checks to /login without advertising OAuth.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-11-02 22:30:26 -06:00
co-authored by Cursor
parent 7fd040ad62
commit ab1d6acb2d
4 changed files with 25 additions and 5 deletions
+3 -1
View File
@@ -16,7 +16,9 @@ export default defineEventHandler((event) => {
path === '/login' ||
// Claude MCP discovery — never 302 to /login (JSON 404 handlers serve these).
path === '/.well-known/oauth-authorization-server' ||
path === '/.well-known/openid-configuration'
path === '/.well-known/openid-configuration' ||
path === '/.well-known/oauth-protected-resource' ||
path.startsWith('/.well-known/oauth-protected-resource/')
) {
return
}