Merge pull request #117 from vonProteus/defaultApiUrl

Ability to override defaultApiUrl
This commit is contained in:
Glax 2024-11-03 02:59:35 +01:00 committed by GitHub
commit 74b71d57b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -1,9 +1,7 @@
let apiUri = `${window.location.protocol}//${window.location.host}/api` if(getCookie("apiUri") != ""){
apiUri = getCookie("apiUri");
// if(getCookie("apiUri") != ""){ }
// apiUri = getCookie("apiUri"); setCookie("apiUri", apiUri);
// }
// setCookie("apiUri", apiUri);
function setCookie(cname, cvalue) { function setCookie(cname, cvalue) {
const d = new Date(); const d = new Date();

1
Website/defaultApiUri.js Normal file
View File

@ -0,0 +1 @@
let apiUri = `${window.location.protocol}//${window.location.host.split(':')[0]}:6531`

View File

@ -293,7 +293,8 @@
<p id="madeWith">Made with Blåhaj 🦈</p> <p id="madeWith">Made with Blåhaj 🦈</p>
</footer> </footer>
</wrapper> </wrapper>
<script src="defaultApiUri.js"></script>
<script src="apiConnector.js"></script> <script src="apiConnector.js"></script>
<script src="interaction.js"></script> <script src="interaction.js"></script>
</body> </body>