Document listener config. Remove deprecated config options
parent
a005b7269a
commit
186f61a3ac
|
@ -21,10 +21,6 @@ class CaptchaConfig(Config):
|
||||||
self.recaptcha_private_key = config["recaptcha_private_key"]
|
self.recaptcha_private_key = config["recaptcha_private_key"]
|
||||||
self.recaptcha_public_key = config["recaptcha_public_key"]
|
self.recaptcha_public_key = config["recaptcha_public_key"]
|
||||||
self.enable_registration_captcha = config["enable_registration_captcha"]
|
self.enable_registration_captcha = config["enable_registration_captcha"]
|
||||||
# XXX: This is used for more than just captcha
|
|
||||||
self.captcha_ip_origin_is_x_forwarded = (
|
|
||||||
config["captcha_ip_origin_is_x_forwarded"]
|
|
||||||
)
|
|
||||||
self.captcha_bypass_secret = config.get("captcha_bypass_secret")
|
self.captcha_bypass_secret = config.get("captcha_bypass_secret")
|
||||||
self.recaptcha_siteverify_api = config["recaptcha_siteverify_api"]
|
self.recaptcha_siteverify_api = config["recaptcha_siteverify_api"]
|
||||||
|
|
||||||
|
@ -43,10 +39,6 @@ class CaptchaConfig(Config):
|
||||||
# public/private key.
|
# public/private key.
|
||||||
enable_registration_captcha: False
|
enable_registration_captcha: False
|
||||||
|
|
||||||
# When checking captchas, use the X-Forwarded-For (XFF) header
|
|
||||||
# as the client IP and not the actual client IP.
|
|
||||||
captcha_ip_origin_is_x_forwarded: False
|
|
||||||
|
|
||||||
# A secret key used to bypass the captcha test entirely.
|
# A secret key used to bypass the captcha test entirely.
|
||||||
#captcha_bypass_secret: "YOUR_SECRET_HERE"
|
#captcha_bypass_secret: "YOUR_SECRET_HERE"
|
||||||
|
|
||||||
|
|
|
@ -132,18 +132,6 @@ class ServerConfig(Config):
|
||||||
# e.g. matrix.org, localhost:8080, etc.
|
# e.g. matrix.org, localhost:8080, etc.
|
||||||
server_name: "%(server_name)s"
|
server_name: "%(server_name)s"
|
||||||
|
|
||||||
# The port to listen for HTTPS requests on.
|
|
||||||
# For when matrix traffic is sent directly to synapse.
|
|
||||||
# bind_port: %(bind_port)s
|
|
||||||
|
|
||||||
# The port to listen for HTTP requests on.
|
|
||||||
# For when matrix traffic passes through loadbalancer that unwraps TLS.
|
|
||||||
# unsecure_port: %(unsecure_port)s
|
|
||||||
|
|
||||||
# Local interface to listen on.
|
|
||||||
# The empty string will cause synapse to listen on all interfaces.
|
|
||||||
# bind_host: ""
|
|
||||||
|
|
||||||
# When running as a daemon, the file to store the pid in
|
# When running as a daemon, the file to store the pid in
|
||||||
pid_file: %(pid_file)s
|
pid_file: %(pid_file)s
|
||||||
|
|
||||||
|
@ -155,39 +143,65 @@ class ServerConfig(Config):
|
||||||
# hard limit.
|
# hard limit.
|
||||||
soft_file_limit: 0
|
soft_file_limit: 0
|
||||||
|
|
||||||
# Turn on the twisted telnet manhole service on localhost on the given
|
# List of ports that Synapse should listen on, their purpose and their
|
||||||
# port.
|
# configuration.
|
||||||
#manhole: 9000
|
listeners:
|
||||||
|
# Main HTTPS listener
|
||||||
|
# For when matrix traffic is sent directly to synapse.
|
||||||
|
-
|
||||||
|
# The port to listen for HTTPS requests on.
|
||||||
|
port: %(bind_port)s
|
||||||
|
|
||||||
|
# Local interface to listen on.
|
||||||
|
# The empty string will cause synapse to listen on all interfaces.
|
||||||
|
bind_address: ''
|
||||||
|
|
||||||
|
# This is a 'http' listener, allows us to specify 'resources'.
|
||||||
|
type: http
|
||||||
|
|
||||||
|
tls: true
|
||||||
|
|
||||||
|
# Use the X-Forwarded-For (XFF) header as the client IP and not the
|
||||||
|
# actual client IP.
|
||||||
|
x_forwarded: false
|
||||||
|
|
||||||
|
# List of HTTP resources to serve on this listener.
|
||||||
|
resources:
|
||||||
|
-
|
||||||
|
# List of resources to host on this listener.
|
||||||
|
names:
|
||||||
|
- client # The client-server APIs, both v1 and v2
|
||||||
|
- webclient # The bundled webclient.
|
||||||
|
|
||||||
# Should synapse compress HTTP responses to clients that support it?
|
# Should synapse compress HTTP responses to clients that support it?
|
||||||
# This should be disabled if running synapse behind a load balancer
|
# This should be disabled if running synapse behind a load balancer
|
||||||
# that can do automatic compression.
|
# that can do automatic compression.
|
||||||
# gzip_responses: True
|
compress: true
|
||||||
|
|
||||||
listeners:
|
- names: [federation] # Federation APIs
|
||||||
- port: %(unsecure_port)s
|
compress: false
|
||||||
|
|
||||||
|
# Unsecure HTTP listener,
|
||||||
|
# For when matrix traffic passes through loadbalancer that unwraps TLS.
|
||||||
|
-
|
||||||
|
port: %(unsecure_port)s
|
||||||
tls: false
|
tls: false
|
||||||
bind_address: ''
|
bind_address: ''
|
||||||
type: http
|
type: http
|
||||||
|
|
||||||
resources:
|
x_forwarded: false
|
||||||
- names: [client, webclient]
|
|
||||||
compress: true
|
|
||||||
- names: [federation]
|
|
||||||
compress: false
|
|
||||||
|
|
||||||
- port: %(bind_port)s
|
|
||||||
tls: true
|
|
||||||
bind_address: ''
|
|
||||||
type: http
|
|
||||||
|
|
||||||
x_forwarded: False
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- names: [client, webclient]
|
- names: [client, webclient]
|
||||||
compress: true
|
compress: true
|
||||||
- names: [federation]
|
- names: [federation]
|
||||||
compress: false
|
compress: false
|
||||||
|
|
||||||
|
# Turn on the twisted telnet manhole service on localhost on the given
|
||||||
|
# port.
|
||||||
|
# - port: 9000
|
||||||
|
# bind_address: 127.0.0.1
|
||||||
|
# type: manhole
|
||||||
""" % locals()
|
""" % locals()
|
||||||
|
|
||||||
def read_arguments(self, args):
|
def read_arguments(self, args):
|
||||||
|
|
Loading…
Reference in New Issue