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"
|
2013-10-15 15:03:48 +02:00
|
|
|
require "rack/rewrite"
|
2019-03-04 22:04:23 +01:00
|
|
|
require "rack/ssl"
|
2013-10-17 05:46:28 +02:00
|
|
|
require "rack/contrib/not_found"
|
|
|
|
require "rack/contrib/try_static"
|
2013-10-13 21:42:08 +02:00
|
|
|
|
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
|
2019-03-04 22:04:23 +01:00
|
|
|
|
2013-10-17 05:51:08 +02:00
|
|
|
use Rack::Deflater
|
|
|
|
|
2018-12-29 01:38:26 +01:00
|
|
|
use Rack::TryStatic,
|
|
|
|
urls: ["/"], root: 'build', index: 'index.html',
|
|
|
|
try: ['.html', '/index.html']
|
2013-10-17 05:46:28 +02:00
|
|
|
|
2018-12-29 01:38:26 +01:00
|
|
|
run Rack::NotFound.new("build/404.html")
|