-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.txt
78 lines (63 loc) · 2.02 KB
/
proxy.txt
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
# Service API endpoints
upstream service-api {
server localhost:1848;
}
# P2P endpoints
upstream peer-api {
server localhost:8888;
}
# Mining endpoints
upstream mining-api {
ip_hash; # for work and solve we need sticky connections
server localhost:1848;
}
upstream header-stream {
server localhost:1848;
}
server {
more_clear_headers Server; # this requires Headers More nginx module
listen YOUR_EXTERNAL_IP:8888 ssl default_server; # external IP can also be your network ip where the firewall does NAT to
# Your valid SSL
ssl_certificate /path/to/abc.xyz.me/fullchain.pem;
ssl_certificate_key /path/to/abc.xyz.me/privkey.pem;
access_log /var/log/nginx/chainweb-api-access.log;
error_log /var/log/nginx/chainweb-api-error.log;
# Service API endpoints
#location = /info {
# proxy_pass http://service-api;
#}
#location = /health-check {
# proxy_pass http://service-api;
#}
#location ~ ^/chainweb/0.0/testnet04/chain/[0-9]+/pact/ {
# proxy_pass http://service-api;
#}
#location ~ ^/chainweb/0.0/testnet04/rosetta/ {
# proxy_pass http://service-api;
#}
# Header stream (not enabled on all nodes)
#location = /chainweb/0.0/testnet04/header/updates {
# proxy_buffering off;
# proxy_pass http://header-stream;
#}
# We are only exposing this node p2p api externally for syncing
# Chain Database Endpoints (forwarded from peer API)
location ~ ^/chainweb/0.0/mainnet01/chain/[0-9]+/(header|hash|branch|payload) {
proxy_pass https://peer-api;
proxy_ssl_verify off; # accept self-signed certificates
}
location = /chainweb/0.0/mainnet01/cut {
limit_except GET OPTIONS { deny all; }
proxy_pass https://peer-api;
proxy_ssl_verify off; # accept self-signed certificates
}
# Mining
#location /chainweb/0.0/testnet04/mining/ {
# proxy_buffering off;
# proxy_pass http://mining-api;
#}
# Default
location / {
return 404;
}
}