summary refs log tree commit diff
path: root/synapse/http/server.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-03-27 13:10:38 +0100
committerGitHub <noreply@github.com>2018-03-27 13:10:38 +0100
commit03a26e28d9ae18beafffefe81cbcf1a490b77646 (patch)
tree85d75685c638ab4ce04bf935b93c37f52f270aab /synapse/http/server.py
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
parentAdd Cache-Control headers to all JSON APIs (diff)
downloadsynapse-03a26e28d9ae18beafffefe81cbcf1a490b77646.tar.xz
Merge pull request #3017 from matrix-org/erikj/add_cache_control_headers
Add Cache-Control headers to all JSON APIs
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r--synapse/http/server.py1
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)