-
Notifications
You must be signed in to change notification settings - Fork 19
/
config.ru
21 lines (18 loc) · 1.16 KB
/
config.ru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
map "/" do
use Rack::Static, urls: ["/assets"], root: Dir.pwd
run lambda { |env|
headers = {
"Content-Type" => "text/html; charset=utf-8",
"Cache-Control" => "private, max-age=0, must-revalidate",
"Strict-Transport-Security" => "max-age=16070400",
"X-Frame-Options" => "SAMEORIGIN",
"X-Content-Type-Options" => "nosniff",
"X-XSS-Protection" => "1; mode=block",
"Content-Security-Policy" => "default-src 'none'; script-src 'self' code.jquery.com netdna.bootstrapcdn.com; style-src 'self' 'unsafe-inline' netdna.bootstrapcdn.com; font-src netdna.bootstrapcdn.com",
"X-Content-Security-Policy" => "default-src 'none'; script-src 'self' code.jquery.com netdna.bootstrapcdn.com; style-src 'self' 'unsafe-inline' netdna.bootstrapcdn.com; font-src netdna.bootstrapcdn.com",
"X-WebKit-CSP" => "default-src 'none'; script-src 'self' code.jquery.com netdna.bootstrapcdn.com; style-src 'self' 'unsafe-inline' netdna.bootstrapcdn.com; font-src netdna.bootstrapcdn.com"
}
body = File.open("#{Dir.pwd}/index.html", File::RDONLY).read
[200, headers, [body]]
}
end