mirror of
https://github.com/RoboSats/robosats-deploy.git
synced 2025-08-09 11:30:16 +00:00
Merge pull request #2 from KoalaSat/block-admin-public-onion
Block admin in public onion
This commit is contained in:
@ -41,7 +41,22 @@ server {
|
|||||||
limit_req zone=tenpersec burst=10;
|
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/ {
|
location /ws/ {
|
||||||
# websockets are passed to Daphne
|
# websockets are passed to Daphne
|
||||||
proxy_pass http://robosats_daphne_websocket;
|
proxy_pass http://robosats_daphne_websocket;
|
||||||
|
@ -18,7 +18,7 @@ upstream robosats_daphne_websocket {
|
|||||||
server {
|
server {
|
||||||
|
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name testnet.robosats.com;
|
server_name satstralia.com;
|
||||||
large_client_header_buffers 4 64k;
|
large_client_header_buffers 4 64k;
|
||||||
|
|
||||||
location /static {
|
location /static {
|
||||||
@ -36,10 +36,25 @@ server {
|
|||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
# Replace with the onion hidden service of your coordinator
|
# 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;
|
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/ {
|
location /ws/ {
|
||||||
# websockets are passed to Daphne
|
# websockets are passed to Daphne
|
||||||
proxy_pass http://robosats_daphne_websocket;
|
proxy_pass http://robosats_daphne_websocket;
|
||||||
|
Reference in New Issue
Block a user