mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
3eeac84ea2
The frontend handler served index.html for any extensionless path, so OAuth Protected Resource Metadata probes under /.well-known/ received HTML with status 200. MCP clients that run RFC 9728 discovery before trusting the endpoint failed to parse it, while a 404 would have told them the server does not advertise OAuth. Paths with a hidden segment are never app routes: usernames, memo UIDs, and fixed routes all begin with an alphanumeric character. Return 404 for them, following RFC 8615 for /.well-known/ and the dotfile convention of common static servers for paths like /.git/. Fixes #6495