Skip to content

Commit

Permalink
Decom acdc (#11581)
Browse files Browse the repository at this point in the history
Co-authored-by: endline <endline>
  • Loading branch information
endline authored Mar 12, 2025
1 parent 69c4da2 commit bb3dc08
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions packages/discovery-provider/nginx_conf/nginx_container.conf
Original file line number Diff line number Diff line change
Expand Up @@ -349,62 +349,40 @@ http {
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
}

location /core/ {
location ~ ^/chain/?$ {
resolver 127.0.0.11 valid=30s;
set $upstream core:80;
proxy_pass http://$upstream$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /console/ {
location ~ ^/core(/.*)?$ {
resolver 127.0.0.11 valid=30s;
set $upstream core:80;
proxy_pass http://$upstream$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/solana(/.*)?$ {
location ~ ^/console(/.*)?$ {
resolver 127.0.0.11 valid=30s;
proxy_pass http://solana-relay:6002/solana$1;
set $upstream core:80;
proxy_pass http://$upstream$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ ^/attestation(/.*)?$ {
location ~ ^/solana(/.*)?$ {
resolver 127.0.0.11 valid=30s;
proxy_pass http://anti-abuse:6003$request_uri;
proxy_pass http://solana-relay:6002/solana$1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~* ^/(nethermind|chain)/peer {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' '*';
resolver 127.0.0.11 valid=30s;
content_by_lua_block {
local port = require "port"
local can_get_ip, ip = port.get_public_ip()
local can_connect = port.get_is_port_exposed(ip, 30300)
if can_get_ip and can_connect then
ngx.status = ngx.HTTP_OK
else
ngx.status = ngx.HTTP_INTERNAL_SERVER_ERROR
end
ngx.say(ip .. "\n" .. tostring(can_connect))
}
}

location ~* ^/(nethermind|chain) {
access_by_lua_block {
local main = require "main"
return main.validate_nethermind_rpc_request()
}

location ~ ^/attestation(/.*)?$ {
resolver 127.0.0.11 valid=30s;
set $upstream chain:8545;
proxy_pass http://$upstream/;
proxy_pass http://anti-abuse:6003$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Expand Down

0 comments on commit bb3dc08

Please sign in to comment.