2012-09-27 03:26:50 -07:00
|
|
|
require "rubygems"
|
2013-10-12 19:53:19 -04:00
|
|
|
|
2019-04-23 09:18:45 -07:00
|
|
|
require "rack/conditional"
|
2013-10-15 09:03:48 -04:00
|
|
|
require "rack/rewrite"
|
2019-03-04 13:04:23 -08:00
|
|
|
require "rack/ssl"
|
2013-10-16 23:46:28 -04:00
|
|
|
require "rack/contrib/not_found"
|
|
|
|
require "rack/contrib/try_static"
|
2013-10-13 15:42:08 -04:00
|
|
|
|
2019-04-23 09:18:45 -07: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
|
2019-03-04 13:04:23 -08:00
|
|
|
|
2013-10-16 23:51:08 -04:00
|
|
|
use Rack::Deflater
|
|
|
|
|
2018-12-28 16:38:26 -08:00
|
|
|
use Rack::TryStatic,
|
|
|
|
urls: ["/"], root: 'build', index: 'index.html',
|
|
|
|
try: ['.html', '/index.html']
|
2013-10-16 23:46:28 -04:00
|
|
|
|
2018-12-28 16:38:26 -08:00
|
|
|
run Rack::NotFound.new("build/404.html")
|