Skip to content
Snippets Groups Projects
Unverified Commit 03a26e28 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #3017 from matrix-org/erikj/add_cache_control_headers

Add Cache-Control headers to all JSON APIs
parents 9b8c0fb1 1c41b05c
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment