forked from avalanche-canada/ac-web
-
Notifications
You must be signed in to change notification settings - Fork 1
/
proxy.conf
77 lines (62 loc) · 2.34 KB
/
proxy.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
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
68
69
70
71
72
73
74
75
76
77
server {
listen 8080;
server_name avalanche.ca;
return 301 $scheme://www.avalanche.ca$request_uri;
}
server {
listen 8080;
client_max_body_size 50M;
server_name www.avalanche.ca;
location /assets {
rewrite /assets/$ /index.html break;
rewrite /assets$ /index.html break;
rewrite /assets/(.*) /$1 break;
proxy_pass https://ac-assets.s3.amazonaws.com;
}
location /fxresources {
rewrite /fxresources/(.*) /$1 break;
proxy_pass https://avalancheca-assets.s3.amazonaws.com;
#proxy_set_header Host $host;
}
location /membership{
return 303 https://membership.avalanche.ca/np/clients/cac/membershipJoin.jsp;
}
location /(forums|Forums){
return 403;
}
location /caa{
return 301 http://www.avalancheassociation.ca;
}
location /caf{
return 301 http://www.avalanche.ca/foundation;
}
location /cac/about/(media|careers){
return 410;
}
location /cac/bulletins/(bulletin-disclaimer|danger-scale|subscribe){
return 410;
}
location / {
rewrite \/cac\/bulletins\/latest\/(.*) /forecasts/$1 permanent ;
rewrite \/cac\/bulletins\/latest$ / permanent ;
rewrite \/cac\/bulletins\/overview$ / permanent ;
rewrite \/cac\/forecasts$ permanent ;
rewrite \/cac\/forecasts/$ permanent ;
rewrite \/cac\/about\/vision-and-mission /about#vision permanent ;
rewrite \/cac\/about\/programs-and-services$ /about#programs permanent ;
rewrite \/cac\/about\/programs-and-services/(.*)$ /about permanent ;
rewrite \/cac\/about\/board-of-directors /about#board permanent ;
rewrite \/cac\/about\/staff /about#staff permanent ;
rewrite \/cac\/about\/service-awards /about#awards permanent ;
rewrite \/cac\/about\/news /news permanent ;
rewrite \/cac\/about\/donate /foundation permanent ;
rewrite \/cac\/forecasts$ / permanent ;
rewrite \/cac\/forecasts/$ / permanent ;
proxy_pass http://nodejs;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}