samsm / rack-static-if-present

Like Rack::Static. Except only if there is a static file to serve.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rack Static If Present

Like Rack::Static. Except only if there is a static file to serve.

Use

use Rack::StaticIfPresent, :urls => ["/"], :root => "public"

This would serve files in all directories from public if they exist, or continue down the middleware chain if they don’t.

Copyright © 2009 Sam Schenkman-Moore. See LICENSE for details.

About

Like Rack::Static. Except only if there is a static file to serve.

License:MIT License


Languages

Language:Ruby 100.0%