mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
fix(auth): fix global prefix exclusion for OIDC routes
Add explicit path exclusions and path-to-regexp wildcard patterns to ensure /api/auth/jwks and other OIDC routes are excluded from the /api/v1 global prefix. This fixes JWKS endpoint accessibility for Matrix Synapse OIDC integration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e46a4c96df
commit
42dafe593b
1 changed files with 6 additions and 0 deletions
|
|
@ -86,9 +86,15 @@ async function bootstrap() {
|
|||
exclude: [
|
||||
{ path: 'metrics', method: RequestMethod.ALL },
|
||||
{ path: 'health', method: RequestMethod.ALL },
|
||||
// Better Auth routes - use path-to-regexp wildcards
|
||||
{ path: 'api/auth/(.*)', method: RequestMethod.ALL },
|
||||
{ path: 'api/auth/jwks', method: RequestMethod.ALL },
|
||||
{ path: 'api/auth/:path*', method: RequestMethod.ALL },
|
||||
// OIDC routes
|
||||
{ path: '.well-known/(.*)', method: RequestMethod.ALL },
|
||||
{ path: '.well-known/openid-configuration', method: RequestMethod.ALL },
|
||||
{ path: 'api/oidc/(.*)', method: RequestMethod.ALL },
|
||||
{ path: 'api/oidc/:path*', method: RequestMethod.ALL },
|
||||
],
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue