Je viens de déployer une page statique à Heroku comme une application de rack statique. Mon config.ru:Rack application, rediriger tout à la racine
use Rack::Static,
:urls => ["/stylesheets", "/images"],
:root => "public",
:index => "public/index.html"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
Maintenant je veux rediriger toute demande à ce fichier index.html statique. Des idées pour y parvenir?
voir http://stackoverflow.com/questions/2265036/how-to-serve-static-files-via-rack – iain