@@ -16,29 +16,34 @@ server {
16
16
try_files /nonexistent-used-for-try-testing @$http_upgrade;
17
17
}
18
18
19
+ # These need to be manually edited to your specific config.
20
+ set $upstream_host YOUR_SERVER;
21
+ set $auth_token REPLACE_ME_WITH_YOUR_AUTH_TOKEN;
22
+
19
23
location @websocket {
20
24
# Cheat a little to make sure we don't have a trailing slash on the
21
25
# path or we get a 405 response (method not allowed)
22
- proxy_pass https://YOUR_SERVER-solana-01.bdnodes.net /$http_upgrade;
26
+ proxy_pass https://$upstream_host /$http_upgrade;
23
27
proxy_http_version 1.1;
24
28
proxy_set_header Host $proxy_host;
25
29
# websocket requirements
26
30
proxy_set_header Upgrade $http_upgrade;
27
31
proxy_set_header Connection "Upgrade";
28
32
# Blockdaemon specific authentication requirement
29
- proxy_set_header Authorization "Bearer REPLACE_ME_WITH_YOUR_AUTH_TOKEN ";
33
+ proxy_set_header Authorization "Bearer $auth_token ";
30
34
proxy_redirect https://$proxy_host http://$server_name:$server_port;
31
35
proxy_redirect https:// http://;
32
36
}
33
37
34
38
location @ {
35
- proxy_pass https://YOUR_SERVER-solana-01.bdnodes.net$request_uri;
39
+ # Example: companyname-solana-09.bdnodes.net
40
+ proxy_pass https://$upstream_host$request_uri;
36
41
proxy_http_version 1.1;
37
42
proxy_set_header Host $proxy_host;
38
43
# HTTP v.1.1 keepalive requirements
39
44
proxy_set_header Connection "";
40
45
# Blockdaemon specific authentication requirement
41
- proxy_set_header Authorization "Bearer REPLACE_ME_WITH_YOUR_AUTH_TOKEN ";
46
+ proxy_set_header Authorization "Bearer $auth_token ";
42
47
proxy_redirect https://$proxy_host http://$server_name:$server_port;
43
48
proxy_redirect https:// http://;
44
49
}
@@ -53,15 +58,18 @@ server {
53
58
server {
54
59
listen 7800;
55
60
61
+ set $upstream_host YOUR_SERVER;
62
+ set $auth_token REPLACE_ME_WITH_YOUR_AUTH_TOKEN;
63
+
56
64
location / {
57
- proxy_pass https://YOUR_SERVER-solana-01.bdnodes.net /websocket;
65
+ proxy_pass https://$upstream_host /websocket;
58
66
proxy_http_version 1.1;
59
67
proxy_set_header Host $proxy_host;
60
68
# websocket requirements
61
69
proxy_set_header Upgrade $http_upgrade;
62
70
proxy_set_header Connection "Upgrade";
63
71
# Blockdaemon specific authentication requirement
64
- proxy_set_header Authorization "Bearer REPLACE_ME_WITH_YOUR_AUTH_TOKEN ";
72
+ proxy_set_header Authorization "Bearer $auth_token ";
65
73
proxy_redirect https://$proxy_host http://$server_name:$server_port;
66
74
proxy_redirect https:// http://;
67
75
}
0 commit comments