Add `Server` to Access-Control-Expose-Headers header (#15908)

This commit is contained in:
Michael Telatynski 2023-07-11 09:18:50 +01:00 committed by GitHub
parent 2328e90fbb
commit b516d91999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

1
changelog.d/15908.misc Normal file
View File

@ -0,0 +1 @@
Add `Server` to Access-Control-Expose-Headers header.

View File

@ -910,7 +910,7 @@ def set_cors_headers(request: SynapseRequest) -> None:
) )
request.setHeader( request.setHeader(
b"Access-Control-Expose-Headers", b"Access-Control-Expose-Headers",
b"Synapse-Trace-Id", b"Synapse-Trace-Id, Server",
) )

View File

@ -268,7 +268,7 @@ class OptionsResourceTests(unittest.TestCase):
) )
self.assertEqual( self.assertEqual(
channel.headers.getRawHeaders(b"Access-Control-Expose-Headers"), 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: def _check_cors_msc3886_headers(self, channel: FakeChannel) -> None: