diff options
author | Michael Telatynski <7t3chguy@gmail.com> | 2023-07-11 09:18:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 09:18:50 +0100 |
commit | b516d919995f3bf36045263376628ff0aa298095 (patch) | |
tree | 720dd845bc3678e7288360d5c3ed368fce415fb9 | |
parent | Make the media `/upload` tracing less ambiguous (#15888) (diff) | |
download | synapse-b516d919995f3bf36045263376628ff0aa298095.tar.xz |
Add `Server` to Access-Control-Expose-Headers header (#15908)
-rw-r--r-- | changelog.d/15908.misc | 1 | ||||
-rw-r--r-- | synapse/http/server.py | 2 | ||||
-rw-r--r-- | tests/test_server.py | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/15908.misc b/changelog.d/15908.misc new file mode 100644 index 0000000000..3ab8674e03 --- /dev/null +++ b/changelog.d/15908.misc @@ -0,0 +1 @@ +Add `Server` to Access-Control-Expose-Headers header. diff --git a/synapse/http/server.py b/synapse/http/server.py index 933172c873..e411ac7e62 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -910,7 +910,7 @@ def set_cors_headers(request: SynapseRequest) -> None: ) request.setHeader( b"Access-Control-Expose-Headers", - b"Synapse-Trace-Id", + b"Synapse-Trace-Id, Server", ) diff --git a/tests/test_server.py b/tests/test_server.py index e266c06a2c..dc491e06ed 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -268,7 +268,7 @@ class OptionsResourceTests(unittest.TestCase): ) self.assertEqual( channel.headers.getRawHeaders(b"Access-Control-Expose-Headers"), - [b"Synapse-Trace-Id"], + [b"Synapse-Trace-Id, Server"], ) def _check_cors_msc3886_headers(self, channel: FakeChannel) -> None: |