sass-site/config.ru

19 lines
489 B
Plaintext
Raw Normal View History

2012-09-27 12:26:50 +02:00
require "rubygems"
2013-10-13 01:53:19 +02:00
2019-04-23 18:18:45 +02:00
require "rack/conditional"
require "rack/rewrite"
require "rack/ssl"
2013-10-17 05:46:28 +02:00
require "rack/contrib/not_found"
require "rack/contrib/try_static"
2019-04-23 18:18:45 +02:00
# Make sure we don't force SSL on domains that don't have SSL certificates.
use Rack::Conditional, proc {|env| env["SERVER_NAME"] == "sass-lang.com"}, Rack::SSL
2013-10-17 05:51:08 +02:00
use Rack::Deflater
use Rack::TryStatic,
urls: ["/"], root: 'build', index: 'index.html',
try: ['.html', '/index.html']
2013-10-17 05:46:28 +02:00
run Rack::NotFound.new("build/404.html")