Skip to content

Commit 3edb2c1

Browse files
committed
keepalive on upstream
1 parent d89e6c4 commit 3edb2c1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

doc/example-nginx-figment.conf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ http {
1414

1515
client_max_body_size 0;
1616

17+
upstream backend {
18+
server solana--mainnet--pyth.datahub.figment.io:443;
19+
keepalive 4;
20+
}
21+
1722
server {
1823
listen 7900;
1924
location / {
2025
proxy_set_header Upgrade $http_upgrade;
2126
proxy_set_header Connection "Upgrade";
22-
proxy_pass https://solana--mainnet.datahub.figment.io/apikey/YOUR_AUTH_TOKEN_HERE/;
27+
proxy_pass https://backend/apikey/YOUR_AUTH_TOKEN_HERE/;
28+
proxy_set_header Host solana--mainnet--pyth.datahub.figment.io;
2329
}
2430
}
2531

@@ -28,7 +34,8 @@ http {
2834
location / {
2935
proxy_http_version 1.1;
3036
proxy_set_header Connection "";
31-
proxy_pass https://solana--mainnet.datahub.figment.io/apikey/YOUR_AUTH_TOKEN_HERE/;
37+
proxy_pass https://backend/apikey/YOUR_AUTH_TOKEN_HERE/;
38+
proxy_set_header Host solana--mainnet--pyth.datahub.figment.io;
3239
}
3340
}
3441
}

0 commit comments

Comments
 (0)