FIX: set last modified date on CDN assets
This commit is contained in:
parent
81682b74b7
commit
efd6bf1490
|
@ -64,6 +64,11 @@ class StaticController < ApplicationController
|
|||
path = (Rails.root + "public/assets/" + path).to_s
|
||||
expires_in 1.year, public: true
|
||||
response.headers["Access-Control-Allow-Origin"] = params[:origin]
|
||||
begin
|
||||
response.headers["Last-Modified"] = File.ctime(path).httpdate
|
||||
rescue Errno::ENOENT
|
||||
raise Discourse::NotFound
|
||||
end
|
||||
opts = {
|
||||
disposition: nil
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ if defined?(Rack::MiniProfiler)
|
|||
(path !~ /qunit/) &&
|
||||
(path !~ /srv\/status/) &&
|
||||
(path !~ /commits-widget/) &&
|
||||
(path !~ /^\/cdn_asset/) &&
|
||||
(path !~ /^\/logs/)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue