From 473c4de528807358714d3cde7aa8e103ad7bdadf Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Wed, 24 Aug 2022 16:42:29 -0700 Subject: [PATCH] Fix selfhosted detection on subpaths --- frontend/src/components/UnsafeAlert.js | 4 ++-- frontend/static/locales/en.json | 2 +- frontend/static/locales/es.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/UnsafeAlert.js b/frontend/src/components/UnsafeAlert.js index 0e81fd27..eda6b674 100644 --- a/frontend/src/components/UnsafeAlert.js +++ b/frontend/src/components/UnsafeAlert.js @@ -20,7 +20,7 @@ class UnsafeAlert extends Component { isSelfhosted(){ var http = new XMLHttpRequest(); - http.open('HEAD', '/selfhosted', false); + http.open('HEAD', `http://${this.getHost()}/selfhosted`, false); http.send(); return http.status!=404; } @@ -48,7 +48,7 @@ class UnsafeAlert extends Component { action={} > {t("You are self-hosting RoboSats")} - {t("RoboSats is served from your own node granting you the strongest security and privacy.")} + {t("RoboSats client is served from your own node granting you the strongest security and privacy.")} diff --git a/frontend/static/locales/en.json b/frontend/static/locales/en.json index edf27080..13f8595f 100644 --- a/frontend/static/locales/en.json +++ b/frontend/static/locales/en.json @@ -5,7 +5,7 @@ "phone_unsafe_alert": "You will not be able to complete a trade. Use <1>Tor Browser and visit the <3>Onion site.", "Hide":"Hide", "You are self-hosting RoboSats":"You are self-hosting RoboSats", - "RoboSats is served from your own node granting you the strongest security and privacy.":"RoboSats is served from your own node granting you the strongest security and privacy.", + "RoboSats client is served from your own node granting you the strongest security and privacy.":"RoboSats client is served from your own node granting you the strongest security and privacy.", "USER GENERATION PAGE - UserGenPage.js": "Landing Page and User Generation", diff --git a/frontend/static/locales/es.json b/frontend/static/locales/es.json index 9982c8e1..938a20c5 100644 --- a/frontend/static/locales/es.json +++ b/frontend/static/locales/es.json @@ -5,7 +5,7 @@ "phone_unsafe_alert": "No podrás completar un intercambio. Usa el <1>Navegador Tor y visita el <3>sitio cebolla.", "Hide": "Ocultar", "You are self-hosting RoboSats":"Estás hosteando RoboSats", - "RoboSats is served from your own node granting you the strongest security and privacy.":"El cliente RoboSats es servido por tu propio nodo, gozas de la mayor seguridad y privacidad.", + "RoboSats client is served from your own node granting you the strongest security and privacy.":"El cliente RoboSats es servido por tu propio nodo, gozas de la mayor seguridad y privacidad.", "UserGenPage": "User Generation Page and Landing Page",