discourse/lib/middleware/optional_sendfile.rb
Sam 5032c96486 FIX: disable x accl redirect for CDN assets
We need to keep headers in tact
2014-07-10 16:32:46 +10:00

11 lines
197 B
Ruby

module Middleware
class OptionalSendfile < Rack::Sendfile
def call(env)
if env["_disable_accl"] == true
@app.call(env)
else
super(env)
end
end
end
end