aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-26 23:59:16 +0800
committer杨宇千 <crupest@outlook.com>2019-08-26 23:59:16 +0800
commit3a2633114c4d48fa32767528ab8220c8cc49cd8f (patch)
tree9f0e6bad0a43ea1ba2f070608527c5dad4fb7d1f /Timeline/Controllers
parentea67db0b2971271612a2fdf9631b1fe4d6ca7e07 (diff)
downloadtimeline-3a2633114c4d48fa32767528ab8220c8cc49cd8f.tar.gz
timeline-3a2633114c4d48fa32767528ab8220c8cc49cd8f.tar.bz2
timeline-3a2633114c4d48fa32767528ab8220c8cc49cd8f.zip
Add Cache-Control header for avatar get.
Diffstat (limited to 'Timeline/Controllers')
-rw-r--r--Timeline/Controllers/UserAvatarController.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Timeline/Controllers/UserAvatarController.cs b/Timeline/Controllers/UserAvatarController.cs
index 964c9b98..59615371 100644
--- a/Timeline/Controllers/UserAvatarController.cs
+++ b/Timeline/Controllers/UserAvatarController.cs
@@ -79,6 +79,8 @@ namespace Timeline.Controllers
var avatarInfo = await _service.GetAvatar(username);
var avatar = avatarInfo.Avatar;
+
+ Response.Headers.Add("Cache-Control", "no-cache, must-revalidate");
return File(avatar.Data, avatar.Type, new DateTimeOffset(avatarInfo.LastModified), eTag);
}
catch (UserNotExistException e)