forked from steemit/sdc-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.conf.template
67 lines (54 loc) · 1.9 KB
/
site.conf.template
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
server {
listen 8081;
server_name $SERVER_NAME;
# proxy traffic for healthcheck to the upstream without https redirect for the ELB to see a 200 on /
location /.well-known/healthcheck.json {
access_log off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_redirect off;
proxy_pass http://steemit-sdc:8080/;
}
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains; preload" always;
location / {
# rewrite http to https (ALB does the https termination)
if ($http_x_forwarded_proto != 'https') {
return 301 https://$server_name$request_uri;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains; preload" always;
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
proxy_pass http://steemit-sdc:8080;
}
location /ws {
access_log off;
return 404;
}
location ~ /wstmp3/? {
access_log off;
return 404;
}
location ~ /wspa? {
#access_log off;
#proxy_pass https://$WSPA_SERVER;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header Host $host;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_http_version 1.1;
#proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection "upgrade";
return 301 https://$WSPA_SERVER;
}
}
server {
listen 8081;
server_name www.$SERVER_NAME;
return 301 https://$SERVER_NAME$request_uri;
}