forked from thoughtbot/resolved
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.ru
More file actions
25 lines (23 loc) · 661 Bytes
/
Copy pathconfig.ru
File metadata and controls
25 lines (23 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require_relative "app/app"
require_relative "lib/exception_handler"
require_relative "lib/request_logger"
require_relative "lib/request_method_validator"
app = Rack::Builder.new do
use Rack::Logger
use RequestLogger
use RequestMethodValidator
use Rack::ShowExceptions
use ExceptionHandler
use Rack::Deflater
use Rack::ConditionalGet
use Rack::ETag
use Rack::Static,
root: "public",
urls: ["/css", "/favicon.ico", "/404.html", "/405.html", "/500.html"],
header_rules: [
[%w[html], {"Content-Type" => "text/html; charset=utf-8"}],
[:all, {"Cache-Control" => "public, max-age=31556952"}]
]
run App.new
end
run app