mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Http login screen on devel
This commit is contained in:
parent
bd0c70177d
commit
dfe931bd6f
2 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ module.exports = function (options) {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
res.render('login', {
|
res.render('login', {
|
||||||
redirect: 'https://' + req.hostname + req.url
|
devel: process.env.NS_DEVEL
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
<input type='hidden' id='cid' name='pw' autocomplete="off"/>
|
<input type='hidden' id='cid' name='pw' autocomplete="off"/>
|
||||||
</div>
|
</div>
|
||||||
<div class='ircLinkContainer' >
|
<div class='ircLinkContainer' >
|
||||||
<a class='ircLink' href='https://qmining.frylabs.net/irc?loginClick'>IRC</a>
|
<a class='ircLink' href='<%= devel? 'http' : 'https' %>://qmining.frylabs.net/irc?loginClick'>IRC</a>
|
||||||
</div>
|
</div>
|
||||||
<button id='sendButton' onclick="Login(this)">Login</button>
|
<button id='sendButton' onclick="Login(this)">Login</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
}
|
}
|
||||||
async function Login(button) {
|
async function Login(button) {
|
||||||
button.innerText = '...'
|
button.innerText = '...'
|
||||||
const rawResponse = await fetch('https://api.frylabs.net/login', {
|
const rawResponse = await fetch('<%= devel? 'http' : 'https' %>://api.frylabs.net/login', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue