I’ve started using xsendfile for speeding up delivery of files that
Rails needs to send. The only thing is, I can only use it in
production where Apache and the appropriate module exist.
What would be a good way for selectively enabling the plugin so that
it only runs in production?
I’ve started using xsendfile for speeding up delivery of files that
Rails needs to send. The only thing is, I can only use it in
production where Apache and the appropriate module exist.
What would be a good way for selectively enabling the plugin so that
it only runs in production?
In init.rb, wrap the exising contents in a test to make sure you’re in
production: