diff options
author | Erik Johnston <erikj@jki.re> | 2018-03-27 13:10:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-27 13:10:38 +0100 |
commit | 03a26e28d9ae18beafffefe81cbcf1a490b77646 (patch) | |
tree | 85d75685c638ab4ce04bf935b93c37f52f270aab | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
parent | Add Cache-Control headers to all JSON APIs (diff) | |
download | synapse-03a26e28d9ae18beafffefe81cbcf1a490b77646.tar.xz |
Merge pull request #3017 from matrix-org/erikj/add_cache_control_headers
Add Cache-Control headers to all JSON APIs
-rw-r--r-- | synapse/http/server.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index 1551db239d..f19c068ef6 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -488,6 +488,7 @@ def respond_with_json_bytes(request, code, json_bytes, send_cors=False, request.setHeader(b"Content-Type", b"application/json") request.setHeader(b"Server", version_string) request.setHeader(b"Content-Length", b"%d" % (len(json_bytes),)) + request.setHeader(b"Cache-Control", b"no-cache, no-store, must-revalidate") if send_cors: set_cors_headers(request) |