Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add Server to Access-Control-Expose-Headers header (#15908)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Jul 11, 2023
1 parent 2328e90 commit b516d91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/15908.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `Server` to Access-Control-Expose-Headers header.
2 changes: 1 addition & 1 deletion synapse/http/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def _check_cors_standard_headers(self, channel: FakeChannel) -> None:
)
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:
Expand Down

0 comments on commit b516d91

Please sign in to comment.