lib/rack/file_alfa.rb in alfa-0.0.5.pre vs lib/rack/file_alfa.rb in alfa-0.0.6.pre
- old
+ new
@@ -1,11 +1,12 @@
require 'rack/file'
module Rack
class FileAlfa < File
#Deny .htaccess files
- def call(env)
+ def _call(env)
return fail(404, 'Not found') if env['PATH_INFO'].split(SEPS).last == '.htaccess'
+ @headers['Expires'] = (Time.now + 2592000).httpdate
super
end
end
end