From 3a2633114c4d48fa32767528ab8220c8cc49cd8f Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Mon, 26 Aug 2019 23:59:16 +0800 Subject: Add Cache-Control header for avatar get. --- Timeline/Controllers/UserAvatarController.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Timeline/Controllers') 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) -- cgit v1.2.3