diff --git a/compose/nginx/mn.conf.d/local.conf b/compose/nginx/mn.conf.d/local.conf index 7b376b4..740b64b 100644 --- a/compose/nginx/mn.conf.d/local.conf +++ b/compose/nginx/mn.conf.d/local.conf @@ -41,7 +41,22 @@ server { limit_req zone=tenpersec burst=10; } - + location /coordinator { + # Blocks admin access from the public onion address + if ($host ~* "satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion") { + return 403; # Forbidden + } + + proxy_pass http://robosats_gunicorn_rest; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_redirect off; + # Replace with the onion hidden service of your coordinator + add_header Onion-Location https://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion$request_uri; + + } + + location /ws/ { # websockets are passed to Daphne proxy_pass http://robosats_daphne_websocket; diff --git a/compose/nginx/tn.conf.d/local.conf b/compose/nginx/tn.conf.d/local.conf index 67e2a64..b5bbb19 100644 --- a/compose/nginx/tn.conf.d/local.conf +++ b/compose/nginx/tn.conf.d/local.conf @@ -18,7 +18,7 @@ upstream robosats_daphne_websocket { server { listen 80; - server_name testnet.robosats.com; + server_name satstralia.com; large_client_header_buffers 4 64k; location /static { @@ -36,10 +36,25 @@ server { proxy_set_header Host $host; proxy_redirect off; # Replace with the onion hidden service of your coordinator - add_header Onion-Location https://qu6xztmzhlve6nxbb77jldek53pvhkaltz6seni7wq6g6yyj233qp4yd.onion$request_uri; + add_header Onion-Location https://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion$request_uri; limit_req zone=fivepersec burst=10; } + location /coordinator { + # Blocks admin access from the public onion address + if ($host ~* "testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion") { + return 403; # Forbidden + } + + proxy_pass http://robosats_gunicorn_rest; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_redirect off; + # Replace with the onion hidden service of your coordinator + add_header Onion-Location https://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion$request_uri; + + } + location /ws/ { # websockets are passed to Daphne proxy_pass http://robosats_daphne_websocket;