Alex Rivera | Logout

How to serve static files via Rack?

Asked 2010-02-15T09:49:27.557
41

I am currently developing a Rack-based application and want to redirect all file requests (e.g. filename.filetype) to a specified folder.

Rack::Static only supports file requests for a special folder(e.g. "/media").

Do I have to write my own Rack middleware or does an out-of-the-box solution exist?

Edit
Report

1 Answer

2
run Rack::Directory.new(Dir.pwd)
answered 2012-09-18T00:26:10.220

Your Answer