diff options
author | Hugh Nimmo-Smith <hughns@users.noreply.github.com> | 2022-10-18 16:52:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 15:52:25 +0000 |
commit | 4eaf3eb840b8cfa78d970216c74fc128495f08a5 (patch) | |
tree | f3f214f9df2b6b207d558961390190763c5bc70d /synapse/config/server.py | |
parent | Don't pin dev-deps in pyproject; use lower bounds (#14227) (diff) | |
download | synapse-4eaf3eb840b8cfa78d970216c74fc128495f08a5.tar.xz |
Implementation of HTTP 307 response for MSC3886 POST endpoint (#14018)
Co-authored-by: reivilibre <olivier@librepush.net> Co-authored-by: Andrew Morgan <andrewm@element.io>
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r-- | synapse/config/server.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py index f2353ce5fb..ec46ca63ad 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -207,6 +207,9 @@ class HttpListenerConfig: additional_resources: Dict[str, dict] = attr.Factory(dict) tag: Optional[str] = None request_id_header: Optional[str] = None + # If true, the listener will return CORS response headers compatible with MSC3886: + # https://github.com/matrix-org/matrix-spec-proposals/pull/3886 + experimental_cors_msc3886: bool = False @attr.s(slots=True, frozen=True, auto_attribs=True) @@ -935,6 +938,7 @@ def parse_listener_def(num: int, listener: Any) -> ListenerConfig: additional_resources=listener.get("additional_resources", {}), tag=listener.get("tag"), request_id_header=listener.get("request_id_header"), + experimental_cors_msc3886=listener.get("experimental_cors_msc3886", False), ) return ListenerConfig(port, bind_addresses, listener_type, tls, http_config) |