1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-06 16:06:52 +00:00
synapse/rust
Quentin Gliech b9276e21ee
Fix MSC4108 'rendez-vous' responses with some reverse proxy in the front of Synapse (#18178)
MSC4108 relies on ETag to determine if something has changed on the
rendez-vous channel.
Strong and correct ETag comparison works if the response body is
bit-for-bit identical, which isn't the case if a proxy in the middle
compresses the response on the fly.

This adds a `no-transform` directive to the `Cache-Control` header,
which tells proxies not to transform the response body.

Additionally, some proxies (nginx) will switch to `Transfer-Encoding:
chunked` if it doesn't know the Content-Length of the response, and
'weakening' the ETag if that's the case. I've added `Content-Length`
headers to all responses, to hopefully solve that.

This basically fixes QR-code login when nginx or cloudflare is involved,
with gzip/zstd/deflate compression enabled.
2025-02-25 11:34:33 +01:00
..
benches Implement MSC4210: Remove legacy mentions (#17783) 2024-10-14 14:24:28 +01:00
src Fix MSC4108 'rendez-vous' responses with some reverse proxy in the front of Synapse (#18178) 2025-02-25 11:34:33 +01:00
build.rs Implement push rule evaluation in Rust. (#13838) 2022-09-29 16:12:09 +01:00
Cargo.toml Cleanup Python 3.8 leftovers (#17967) 2025-02-10 16:53:24 +00:00