summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-17 13:33:54 +0000
committerGitHub <noreply@github.com>2018-08-17 13:33:54 +0000
commit4c22b4047b53e36303c3513e21b3ba9b12ca14ce (patch)
treef0439ed7a668a2b0d627b78aaab25b03a2fb6514 /synapse/config
parentMerge pull request #3708 from matrix-org/neilj/resource_Limit_block_event_cre... (diff)
parentMerge branch 'neilj/limit_exceeded_error' of github.com:matrix-org/synapse in... (diff)
downloadsynapse-4c22b4047b53e36303c3513e21b3ba9b12ca14ce.tar.xz
Merge pull request #3707 from matrix-org/neilj/limit_exceeded_error
add new error type ResourceLimit
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/server.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 2190f3210a..a41c48e69c 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -81,6 +81,7 @@ class ServerConfig(Config):
         # Options to disable HS
         self.hs_disabled = config.get("hs_disabled", False)
         self.hs_disabled_message = config.get("hs_disabled_message", "")
+        self.hs_disabled_limit_type = config.get("hs_disabled_limit_type", "")
 
         # Admin uri to direct users at should their instance become blocked
         # due to resource constraints
@@ -340,6 +341,32 @@ class ServerConfig(Config):
           # - port: 9000
           #   bind_addresses: ['::1', '127.0.0.1']
           #   type: manhole
+
+
+          # Homeserver blocking
+          #
+          # How to reach the server admin, used in ResourceLimitError
+          # admin_uri: 'mailto:admin@server.com'
+          #
+          # Global block config
+          #
+          # hs_disabled: False
+          # hs_disabled_message: 'Human readable reason for why the HS is blocked'
+          # hs_disabled_limit_type: 'error code(str), to help clients decode reason'
+          #
+          # Monthly Active User Blocking
+          #
+          # Enables monthly active user checking
+          # limit_usage_by_mau: False
+          # max_mau_value: 50
+          #
+          # Sometimes the server admin will want to ensure certain accounts are
+          # never blocked by mau checking. These accounts are specified here.
+          #
+          # mau_limit_reserved_threepids:
+          # - medium: 'email'
+          #   address: 'reserved_user@example.com'
+
         """ % locals()
 
     def read_arguments(self, args):