summary refs log tree commit diff
path: root/synapse/rest/media/v1
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-02-02 16:34:07 +0000
committerMark Haines <mark.haines@matrix.org>2015-02-02 16:57:26 +0000
commit1bb0528316729eb19536d8f3a45564d8dc02cb4a (patch)
tree077095e7c55a1c55aea41d524499c60d445592a9 /synapse/rest/media/v1
parentFix setting identicon width and height (diff)
downloadsynapse-1bb0528316729eb19536d8f3a45564d8dc02cb4a.tar.xz
Add Cache-Control header to identicon
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r--synapse/rest/media/v1/identicon_resource.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/identicon_resource.py b/synapse/rest/media/v1/identicon_resource.py
index 12d98e1774..912856386a 100644
--- a/synapse/rest/media/v1/identicon_resource.py
+++ b/synapse/rest/media/v1/identicon_resource.py
@@ -45,4 +45,7 @@ class IdenticonResource(Resource):
         height = int(request.args.get("height", [96])[0])
         identicon_bytes = self.generate_identicon(name, width, height)
         request.setHeader(b"Content-Type", b"image/png")
+        request.setHeader(
+            b"Cache-Control", b"public,max-age=86400,s-maxage=86400"
+        )
         return identicon_bytes