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 {
|
||||
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"/>
|
||||
</div>
|
||||
<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>
|
||||
<button id='sendButton' onclick="Login(this)">Login</button>
|
||||
</div>
|
||||
|
@ -117,7 +117,7 @@
|
|||
}
|
||||
async function Login(button) {
|
||||
button.innerText = '...'
|
||||
const rawResponse = await fetch('https://api.frylabs.net/login', {
|
||||
const rawResponse = await fetch('<%= devel? 'http' : 'https' %>://api.frylabs.net/login', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue