mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FIX: set old last modified date for invalid avatars
In some cases Akami was holding tight to these invalid avatars, to avoid this happening we explain the avatar image is ancient then when a new upload is added it automatically is older than this.
This commit is contained in:
@ -173,7 +173,7 @@ class UserAvatarsController < ApplicationController
|
||||
def render_blank
|
||||
path = Rails.root + "public/images/avatar.png"
|
||||
expires_in 10.minutes, public: true
|
||||
response.headers["Last-Modified"] = 10.minutes.ago.httpdate
|
||||
response.headers["Last-Modified"] = Time.new('1990-01-01').httpdate
|
||||
response.headers["Content-Length"] = File.size(path).to_s
|
||||
send_file path, disposition: nil
|
||||
end
|
||||
|
Reference in New Issue
Block a user