Reputation: 26865
How do I serve a file statically with the correct content-type headers if it is not (for good reason) in the "public/" directory?
Upvotes: 1
Views: 629
Reputation: 65455
See Rack::Static.
module MyApp
class Application < Rails::Application
config.middleware.use Rack::Static,
:urls => [ '/my-secret-dir' ],
:root => 'my/secret/dir'
end
end
Upvotes: 1