Do not send Last-Modified for index.html

Since index.html does not change it will always be set on last
modification date, we could send it if it was based also on
public/version file.
This commit is contained in:
Piotr Sarnacki 2012-10-09 13:59:24 +02:00
parent 233e95b18d
commit b6169e095e

View File

@ -10,7 +10,9 @@ class Travis::Web::App
def index
proc do |env|
Rack::File.new(nil).tap { |f| f.path = 'public/index.html' }.serving(env)
status, headers, body = Rack::File.new(nil).tap { |f| f.path = 'public/index.html' }.serving(env)
headers.delete 'Last-Modified'
[status, headers, body]
end
end
end