mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
FIX: disable x accl redirect for CDN assets
We need to keep headers in tact
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user