aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers/UserAvatarController.cs
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
commit2ec12846133c39133fad955461ee866d5de18deb (patch)
tree9f0e6bad0a43ea1ba2f070608527c5dad4fb7d1f /Timeline/Controllers/UserAvatarController.cs
parent7d5076a0c5e95380ee872e3898b2654f2757b6a4 (diff)
downloadtimeline-2ec12846133c39133fad955461ee866d5de18deb.tar.gz
timeline-2ec12846133c39133fad955461ee866d5de18deb.tar.bz2
timeline-2ec12846133c39133fad955461ee866d5de18deb.zip
Add Cache-Control header for avatar get.
Diffstat (limited to 'Timeline/Controllers/UserAvatarController.cs')
-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)