p2p https and login fix, removed static domain from ejs files

This commit is contained in:
mrfry 2023-04-07 16:32:22 +02:00
parent ae3bd7c55a
commit e858d7f23e
13 changed files with 210 additions and 79 deletions

View file

@ -3,7 +3,7 @@
<body bgcolor="#222426">
<head>
<title>Nem található - Qmining | Frylabs.net</title>
<title>Qmining | <%= domain %> - 404</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Kameron&family=Overpass+Mono:wght@300;400&display=swap');
body {

View file

@ -1,7 +1,7 @@
<html>
<body bgcolor="#222426">
<head>
<title>Qmining | Frylabs.net - Login</title>
<title>Qmining | <%= domain %> - Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.6" />
<style>
@ -123,7 +123,7 @@
button.classList.add('disabledButton')
button.disabled = true
// TODO: get url from controller
const rawResponse = await fetch('<%= devel ? 'http://localhost:8080/api/login' : 'https://frylabs.net/api/login' %>', {
const rawResponse = await fetch('<%= useHttp ? `http://${domain}/api/login` : `https://${domain}/api/login` %>', {
method: 'POST',
credentials: 'include',
headers: {