mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: disable x accl redirect for CDN assets
We need to keep headers in tact
This commit is contained in:
11
lib/middleware/optional_sendfile.rb
Normal file
11
lib/middleware/optional_sendfile.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
module Middleware
|
||||
class OptionalSendfile < Rack::Sendfile
|
||||
def call(env)
|
||||
if env["_disable_accl"] == true
|
||||
@app.call(env)
|
||||
else
|
||||
super(env)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user