2022-12-14 18:59:40 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
|
|
|
server_name localhost;
|
|
|
|
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
location = /50x.html {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
}
|
|
|
|
|
|
|
|
### geth
|
|
|
|
location ~ ^/eth/?([^/]*)$ {
|
|
|
|
set $apiKey $1;
|
|
|
|
if ($apiKey = '') {
|
|
|
|
set $apiKey $http_X_API_KEY;
|
|
|
|
}
|
|
|
|
auth_request /auth;
|
|
|
|
proxy_buffering off;
|
|
|
|
rewrite /.*$ / break;
|
|
|
|
proxy_pass http://fixturenet-eth-geth-1:8545;
|
|
|
|
}
|
|
|
|
|
2023-01-23 16:39:15 +00:00
|
|
|
## ipld-eth-server
|
2023-01-25 17:50:08 +00:00
|
|
|
# location ~ ^/ipld/eth/([^/]*)$ {
|
2022-12-14 18:59:40 +00:00
|
|
|
# set $apiKey $1;
|
|
|
|
# if ($apiKey = '') {
|
|
|
|
# set $apiKey $http_X_API_KEY;
|
|
|
|
# }
|
|
|
|
# auth_request /auth;
|
2023-01-25 17:50:08 +00:00
|
|
|
# auth_request_set $user_id $sent_http_x_user_id;
|
2022-12-14 18:59:40 +00:00
|
|
|
# proxy_buffering off;
|
|
|
|
# rewrite /.*$ / break;
|
2023-01-25 17:50:08 +00:00
|
|
|
# proxy_pass http://ipld-eth-server:8081;
|
|
|
|
# proxy_set_header X-Original-Remote-Addr $remote_addr;
|
|
|
|
# proxy_set_header X-User-Id $user_id;
|
2022-12-14 18:59:40 +00:00
|
|
|
# }
|
|
|
|
#
|
2023-01-25 17:50:08 +00:00
|
|
|
# location ~ ^/ipld/gql/([^/]*)$ {
|
|
|
|
# set $apiKey $1;
|
|
|
|
# if ($apiKey = '') {
|
|
|
|
# set $apiKey $http_X_API_KEY;
|
|
|
|
# }
|
2022-12-14 18:59:40 +00:00
|
|
|
# auth_request /auth;
|
|
|
|
# proxy_buffering off;
|
2023-01-25 17:50:08 +00:00
|
|
|
# rewrite /.*$ / break;
|
|
|
|
# proxy_pass http://ipld-eth-server:8082;
|
2022-12-14 18:59:40 +00:00
|
|
|
# }
|
|
|
|
|
2023-01-25 17:50:08 +00:00
|
|
|
## lighthouse
|
|
|
|
location /beacon/ {
|
|
|
|
set $apiKey $http_X_API_KEY;
|
|
|
|
auth_request /auth;
|
|
|
|
proxy_buffering off;
|
|
|
|
proxy_pass http://fixturenet-eth-lighthouse-1:8001/;
|
|
|
|
}
|
|
|
|
|
2022-12-14 18:59:40 +00:00
|
|
|
location = /auth {
|
|
|
|
internal;
|
|
|
|
proxy_buffering off;
|
|
|
|
resolver 127.0.0.11 ipv6=off;
|
|
|
|
proxy_pass http://keycloak:8080/auth/realms/cerc/check?apiKey=$apiKey;
|
|
|
|
proxy_pass_request_body off;
|
|
|
|
proxy_set_header Content-Length "";
|
|
|
|
proxy_set_header X-Original-URI $request_uri;
|
|
|
|
proxy_set_header X-Original-Remote-Addr $remote_addr;
|
|
|
|
proxy_set_header X-Original-Host $host;
|
|
|
|
}
|
|
|
|
|
2023-01-25 17:50:08 +00:00
|
|
|
location = /stub_status {
|
|
|
|
stub_status;
|
|
|
|
}
|
2022-12-14 18:59:40 +00:00
|
|
|
}
|