-
Notifications
You must be signed in to change notification settings - Fork 21
/
nginx-bees.conf
39 lines (30 loc) · 1.3 KB
/
nginx-bees.conf
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
server {
listen 8080;
access_log /var/log/nginx/access.log;
root /usr/share/nginx/html;
index index.html;
location ~* \.(css|eot|gz|ico|jpg|jpeg|js|json|map|png|svg|otf|ttf|woff|woff2)$ {
add_header X-Content-Type-Options "nosniff";
# Cache static files.
expires 1h;
add_header Cache-Control "public, max-age=3600, immutable";
}
location ~* google[a-z0-9]*\.html$ {
add_header X-Content-Type-Options "nosniff";
# HTML responses must not be cached.
expires -1y;
add_header Pragma "no-cache";
}
location / {
add_header Content-Security-Policy "base-uri 'self'; object-src 'none'; script-src 'self' 'unsafe-eval' https://fast.appcues.com https://cdnjs.cloudflare.com; style-src * 'unsafe-inline'";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
# HTML responses must not be cached.
expires -1y;
add_header Pragma "no-cache";
# First attempt to serve request as file, then as directory, then fall back to redirecting to index.html
try_files $uri $uri/ /index.html;
}
}