Fix selfhosted detection on subpaths

This commit is contained in:
Reckless_Satoshi 2022-08-24 16:42:29 -07:00
parent dd2832794e
commit 473c4de528
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 4 additions and 4 deletions

View File

@ -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={<Button color="success" onClick={() => this.setState({show:false})}>{t("Hide")}</Button>}
>
<AlertTitle>{t("You are self-hosting RoboSats")}</AlertTitle>
{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.")}
</Alert>
</Paper>
</div>

View File

@ -5,7 +5,7 @@
"phone_unsafe_alert": "You will not be able to complete a trade. Use <1>Tor Browser</1> and visit the <3>Onion</3> 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",

View File

@ -5,7 +5,7 @@
"phone_unsafe_alert": "No podrás completar un intercambio. Usa el <1>Navegador Tor</1> y visita el <3>sitio cebolla</3>.",
"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",