mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added contact to login, added some auth exceptions
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = function (options) {
|
||||
const ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress
|
||||
const sessionID = req.cookies.sessionID
|
||||
const isException = exceptions.some((exc) => {
|
||||
return req.url === exc
|
||||
return req.url.split('?')[0] === exc
|
||||
})
|
||||
|
||||
// TODO Allowing all urls with _next in it, but not in params
|
||||
|
@@ -72,7 +72,11 @@ function GetApp () {
|
||||
exceptions: [
|
||||
'/favicon.ico',
|
||||
'/login',
|
||||
'/getveteranpw'
|
||||
'/getveteranpw',
|
||||
'/postfeedbackfile',
|
||||
'/postfeedback',
|
||||
'/fosuploader',
|
||||
'/badtestsender'
|
||||
]
|
||||
}))
|
||||
app.use(express.static('public'))
|
||||
@@ -575,6 +579,7 @@ function GetApp () {
|
||||
}
|
||||
|
||||
function IncrementAvaiblePWs () {
|
||||
// FIXME: check this if this is legit and works
|
||||
const users = dbtools.SelectAll(userDB, 'users')
|
||||
const today = new Date()
|
||||
const getDayDiff = (dateString) => {
|
||||
@@ -593,6 +598,7 @@ function GetApp () {
|
||||
}
|
||||
|
||||
if (dayDiff % addPWPerDay === 0) {
|
||||
logger.Log(`Incrementing avaible PW-s for user #${u.id}`, logger.GetColor('cyan'))
|
||||
dbtools.Update(userDB, 'users', {
|
||||
avaiblePWRequests: u.avaiblePWRequests + 1
|
||||
}, {
|
||||
|
Submodule modules/dataEditor/qmining-data-editor updated: 0ba12f4d67...179aa6ebfa
Submodule modules/qmining/qmining-page updated: 9f576a41f6...42e6d4dd4c
@@ -54,7 +54,10 @@ function GetApp () {
|
||||
jsonResponse: false,
|
||||
exceptions: [
|
||||
'/favicon.ico',
|
||||
'/getVeteranPw'
|
||||
'/getVeteranPw',
|
||||
'/moodle-test-userscript/stable.user.js',
|
||||
'/donate',
|
||||
'/irc'
|
||||
]
|
||||
}))
|
||||
app.use(express.static('modules/qmining/public'))
|
||||
@@ -82,7 +85,7 @@ function GetApp () {
|
||||
},
|
||||
{
|
||||
from: '/install',
|
||||
to: 'https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help'
|
||||
to: 'https://qmining.frylabs.net/moodle-test-userscript/stable.user.js'
|
||||
},
|
||||
{
|
||||
from: '/servergit',
|
||||
|
@@ -62,6 +62,14 @@
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ircLinkContainer {
|
||||
display: flex;
|
||||
justify-content: flex-end
|
||||
}
|
||||
.ircLink {
|
||||
color: #9999ff;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<div class='center'>
|
||||
@@ -77,6 +85,9 @@
|
||||
👁
|
||||
</span> -->
|
||||
</div>
|
||||
<div class='ircLinkContainer' >
|
||||
<a class='ircLink' href='https://qmining.frylabs.net/irc?loginClick'>Contact</a>
|
||||
</div>
|
||||
<button id='sendButton' onclick="Login(this)">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user