use onion for api when served over onion

This commit is contained in:
Kevin F 2022-11-21 21:48:11 +00:00
parent 9c5349d1a8
commit 26b6b68165
2 changed files with 4 additions and 1 deletions

View File

@ -106,7 +106,7 @@ __ __ _____ __ __ _____
<br><br>
<div>
<a href="mailto:support@voidnet.tech?subject=MoneroSMS Support"><button>Get Support/Report Bug</button></a>
<p>This webUI is in alpha, please be patient and let us know of any problems or suggestions you have.</p>
<p v-if="userID">This webUI is in alpha, please be patient and let us know of any problems or suggestions you have.</p>
</div>
</div>
</div>

View File

@ -280,6 +280,9 @@ let app = createApp({
setInterval(()=>{
this.getCredits()
}, 30000)
if (document.location.hostname.endsWith(".onion")){
this.backend = "http://api.xmr4smsoncunkfgfjr6xmxl57afsmuu6rg2bwuysbgg4wdtoawamwxad.onion/"
}
}
})