Created
March 11, 2011 09:31
-
-
Save mdub/865671 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined?(Heroku::StaticAssetsMiddleware) | |
puts "Carefully adjusting Heroku::StaticAssetsMiddleware" | |
class Heroku::StaticAssetsMiddleware | |
def can_cache?(reply) | |
status, headers, body = reply | |
# if there's already a "Cache-Control" header, don't override it | |
body.kind_of?(Rack::File) and status.to_i == 200 and !headers.has_key?("Cache-Control") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment