comms: return 405 for GET /register
This commit is contained in:
parent
49ec3d1be8
commit
658e434e65
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user