summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/15908.misc1
-rw-r--r--synapse/http/server.py2
-rw-r--r--tests/test_server.py2
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: