Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Rack::Static,
- :urls => ["/style"],
- :root => "public"
- run lambda { |env|
- [
- 200,
- {
- 'Content-Type' => 'text/html',
- 'Cache-Control' => 'public, max-age=86400'
- },
- File.open('public/index.html', File::RDONLY)
- ]
- }
- use Rack::Rewrite do
- r301 %r{.*}, 'http://www.domain.com$&', :if => Proc.new {|rack_env|
- rack_env['SERVER_NAME'] != 'www.domain.com'
- }
- end if Rails.env == 'production'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement