comms: return 405 for GET /register

This commit is contained in:
Brad Stein 2026-01-07 11:14:28 -03:00
parent 49ec3d1be8
commit 658e434e65
2 changed files with 5 additions and 2 deletions

View File

@ -72,8 +72,11 @@ data:
self.end_headers()
def do_GET(self): # noqa: N802
if self.path in ("/healthz", "/"):
parsed = parse.urlparse(self.path)
if parsed.path in ("/healthz", "/"):
return self._send_json(200, {"ok": True})
if parsed.path in ("/_matrix/client/v3/register", "/_matrix/client/r0/register"):
return self._send_json(405, {"errcode": "M_UNRECOGNIZED", "error": "Unrecognized request"})
return self._send_json(404, {"errcode": "M_NOT_FOUND", "error": "not_found"})
def do_POST(self): # noqa: N802

View File

@ -13,7 +13,7 @@ spec:
template:
metadata:
annotations:
checksum/config: guest-register-proxy-1
checksum/config: guest-register-proxy-2
labels:
app.kubernetes.io/name: matrix-guest-register
spec: