Skip to content

Commit f724f05

Browse files
committed
Merge branch 'master' into update/conduit-hyper
2 parents b5e1209 + 2e2e461 commit f724f05

File tree

18 files changed

+4056
-3724
lines changed

18 files changed

+4056
-3724
lines changed

Cargo.lock

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ docopt = "1.0"
5858
scheduled-thread-pool = "0.2.0"
5959
derive_deref = "1.0.0"
6060
reqwest = { version = "0.10", features = ["blocking", "gzip", "json"] }
61-
tempdir = "0.3.7"
61+
tempfile = "3"
6262
parking_lot = "0.7.1"
6363
jemallocator = { version = "0.3", features = ['unprefixed_malloc_on_supported_platforms', 'profiling'] }
6464

config/nginx.conf.erb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<%
2+
def s3_host(env)
3+
cdn = env['S3_CDN']
4+
if cdn and !cdn.empty?
5+
return cdn
6+
end
7+
8+
region = env['S3_REGION']
9+
bucket = env['S3_BUCKET']
10+
11+
if region and !region.empty?
12+
region = "-#{region}"
13+
end
14+
15+
return "#{bucket}.s3#{region}.amazonaws.com"
16+
end
17+
%>
18+
119
daemon off;
220
#Heroku dynos have at least 4 cores.
321
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;
@@ -121,6 +139,11 @@ http {
121139
expires max;
122140
}
123141

142+
add_header X-Content-Type-Options "nosniff";
143+
add_header X-Frame-Options "SAMEORIGIN";
144+
add_header X-XSS-Protection "1; mode=block";
145+
add_header Content-Security-Policy "default-src 'self'; connect-src 'self' https://docs.rs https://<%= s3_host(ENV) %>; script-src 'self' 'unsafe-eval' https://www.google.com; style-src 'self' https://www.google.com https://ajax.googleapis.com; img-src *; object-src 'none'";
146+
124147
add_header Strict-Transport-Security "max-age=31536000" always;
125148
add_header Vary 'Accept, Accept-Encoding, Cookie';
126149
proxy_set_header Host $http_host;

0 commit comments

Comments
 (0)