Proxy for geth, ipld-eth-server, and lighthouse.

This commit is contained in:
Thomas E Lackey 2022-12-13 11:17:47 -06:00
parent a32e7eb2a2
commit 0d285f5ff8

View File

@ -8,14 +8,46 @@ server {
root /usr/share/nginx/html; root /usr/share/nginx/html;
} }
location ~ ^/v1/([^/]*)$ { location ~ ^/eth/?([^/]*)$ {
set $apiKey $1; set $apiKey $1;
if ($apiKey = '') {
set $apiKey $http_X_API_KEY;
}
auth_request /auth; auth_request /auth;
proxy_buffering off; proxy_buffering off;
rewrite /.*$ / break; rewrite /.*$ / break;
proxy_pass http://fixturenet-eth-geth-1:8545; proxy_pass http://fixturenet-eth-geth-1:8545;
} }
location ~ ^/ipld/eth/([^/]*)$ {
set $apiKey $1;
if ($apiKey = '') {
set $apiKey $http_X_API_KEY;
}
auth_request /auth;
proxy_buffering off;
rewrite /.*$ / break;
proxy_pass http://ipld-eth-server:8081;
}
location ~ ^/ipld/gql/([^/]*)$ {
set $apiKey $1;
if ($apiKey = '') {
set $apiKey $http_X_API_KEY;
}
auth_request /auth;
proxy_buffering off;
rewrite /.*$ / break;
proxy_pass http://ipld-eth-server:8082;
}
location /beacon/ {
set $apiKey $http_X_API_KEY;
auth_request /auth;
proxy_buffering off;
proxy_pass http://fixturenet-eth-lighthouse-1:8001/;
}
location = /auth { location = /auth {
internal; internal;
proxy_buffering off; proxy_buffering off;