Permalink
Browse files

use latest Rack and serve everything as a static asset

catch all unrecognised routes with a 404
  • Loading branch information...
1 parent 7bd6a5d commit 803a95e1bdb00546276ffda82f107aaa774fb907 @stevenwilkin committed Jan 30, 2012
Showing with 3 additions and 12 deletions.
  1. +1 −1 Gemfile.lock
  2. +2 −11 config.ru
View
@@ -1,7 +1,7 @@
GEM
remote: http://rubygems.org/
specs:
- rack (1.3.5)
+ rack (1.4.1)
PLATFORMS
ruby
View
@@ -2,15 +2,6 @@ require './lib/no_www'
use NoWWW
-use Rack::Static, :urls => ['/css', '/img'], :root => 'public'
+use Rack::Static, :urls => [''], :root => 'public', :index => 'index.html'
-run lambda { |env|
- [
- 200,
- {
- 'Content-Type' => 'text/html',
- 'Cache-Control' => 'public, max-age=86400'
- },
- File.open('public/index.html', File::RDONLY)
- ]
-}
+run lambda { |env| [404, {'Content-Type' => 'text/plain'}, 'Not found'] }

0 comments on commit 803a95e

Please sign in to comment.