Skip to content
Snippets Groups Projects
Unverified Commit 73f09788 authored by Dirk Klimpel's avatar Dirk Klimpel Committed by GitHub
Browse files

Add listener `health` (#14747)

Fixes: #8780
parent 7b3a8f2b
No related branches found
No related tags found
No related merge requests found
Add a dedicated listener configuration for `health` endpoint.
\ No newline at end of file
......@@ -480,6 +480,12 @@ Valid resource names are:
* `static`: static resources under synapse/static (/_matrix/static). (Mostly useful for 'fallback authentication'.)
* `health`: the [health check endpoint](../../reverse_proxy.md#health-check-endpoint). This endpoint
is by default active for all other resources and does not have to be activated separately.
This is only useful if you want to use the health endpoint explicitly on a dedicated port or
for [workers](../../workers.md) and containers without listener e.g.
[application services](../../workers.md#notifying-application-services).
Example configuration #1:
```yaml
listeners:
......
......@@ -199,6 +199,9 @@ class GenericWorkerServer(HomeServer):
"A 'media' listener is configured but the media"
" repository is disabled. Ignoring."
)
elif name == "health":
# Skip loading, health resource is always included
continue
if name == "openid" and "federation" not in res.names:
# Only load the openid resource separately if federation resource
......
......@@ -96,6 +96,9 @@ class SynapseHomeServer(HomeServer):
# Skip loading openid resource if federation is defined
# since federation resource will include openid
continue
if name == "health":
# Skip loading, health resource is always included
continue
resources.update(self._configure_named_resource(name, res.compress))
additional_resources = listener_config.http_options.additional_resources
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment