Skip to content

Commit f4762cb

Browse files
committed
try to fix federation reader route conflict
1 parent bfe6922 commit f4762cb

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

charts/synapse/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
apiVersion: v2
33
name: synapse
44
description: matrix synapse kubernetes deployment
5-
version: 2.1.0
5+
version: 2.1.1
66
appVersion: 1.149.1

charts/synapse/values.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ ingress:
434434
- "/_matrix/client/(unstable|v1)/org.matrix.msc4108/rendezvous$"
435435
- "/_synapse/client/rendezvous$"
436436
# federation overrides to main/master process
437-
- "/_matrix/federation/v1/openid/userinfo$"
437+
#- "/_matrix/federation/v1/openid/userinfo$"
438438
# send all other traffic to the main/master process, should go last in lb config
439439
masterRoutes:
440440
- "/_matrix/"
@@ -576,8 +576,15 @@ ingress:
576576
# source: no specific password_policy file found; workers.md:276 documents (r0|v3|unstable)
577577
- "/_matrix/client/(r0|v3|unstable)/password_policy$"
578578
federationReaderRoutes:
579-
# broad pattern - must be LAST to avoid shadowing more specific routes above
580-
- "/_matrix/(federation/(v1|v2)|key/v2)/"
579+
# original:
580+
# - "/_matrix/(federation/(v1|v2)|key/v2)/"
581+
# NGINX ingress sorts ImplementationSpecific regex paths by string length (longer = higher priority).
582+
# This pattern (56 chars) is tried before shorter routes, so negative lookaheads are required to
583+
# prevent shadowing:
584+
# - (?!/(media|openid)) excludes:
585+
# /_matrix/federation/v1/media/ (29 chars) → must go to synapse-media-repository
586+
# /_matrix/federation/v1/openid/ (37 chars) → must go to synapse-master (masterOverridesRoutes)
587+
- "/_matrix/(federation/(v1|v2)(?!/(media|openid))|key/v2)/"
581588
# enabled if MAS is enabled, mutually exclusive with clientReaderRegister
582589
# source: login.py:76,588 logout.py:38,65
583590
# Fixed: explicit version prefixes instead of greedy (.*) to avoid matching subpaths unexpectedly

0 commit comments

Comments
 (0)