FIX: disable x accl redirect for CDN assets

We need to keep headers in tact
This commit is contained in:
Sam
2014-07-10 16:32:06 +10:00
parent e4a7f652cc
commit 5032c96486
5 changed files with 24 additions and 2 deletions

View File

@ -73,6 +73,10 @@ class StaticController < ApplicationController
disposition: nil
}
opts[:type] = "application/x-javascript" if path =~ /\.js$/
# we must disable acceleration otherwise NGINX strips
# access control headers
request.env['_disable_accl'] = true
send_file(path, opts)
end
end