From 09f8dbb6872559de5fa0827fe8ee686f3a49d9f9 Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Sun, 7 Jul 2024 13:47:10 +0000 Subject: [PATCH] Update local.conf --- compose/nginx/tn.conf.d/local.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compose/nginx/tn.conf.d/local.conf b/compose/nginx/tn.conf.d/local.conf index aed3905..e2114db 100644 --- a/compose/nginx/tn.conf.d/local.conf +++ b/compose/nginx/tn.conf.d/local.conf @@ -40,6 +40,21 @@ server { limit_req zone=fivepersec burst=10; } + location /coordinator { + # Blocks admin access from the public onion address + if ($host ~* "robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.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://robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion$request_uri; + + } + location /ws/ { # websockets are passed to Daphne proxy_pass http://robosats_daphne_websocket;