From 26b6b68165970d515743b58430b3e8e4ca82966b Mon Sep 17 00:00:00 2001 From: Kevin F Date: Mon, 21 Nov 2022 21:48:11 +0000 Subject: [PATCH] use onion for api when served over onion --- index.html | 2 +- main.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e8b9369..829a9d5 100644 --- a/index.html +++ b/index.html @@ -106,7 +106,7 @@ __ __ _____ __ __ _____

-

This webUI is in alpha, please be patient and let us know of any problems or suggestions you have.

+

This webUI is in alpha, please be patient and let us know of any problems or suggestions you have.

diff --git a/main.js b/main.js index 6384041..57c62cc 100644 --- a/main.js +++ b/main.js @@ -280,6 +280,9 @@ let app = createApp({ setInterval(()=>{ this.getCredits() }, 30000) + if (document.location.hostname.endsWith(".onion")){ + this.backend = "http://api.xmr4smsoncunkfgfjr6xmxl57afsmuu6rg2bwuysbgg4wdtoawamwxad.onion/" + } } })