You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
bugfixes
This commit is contained in:
@@ -16,7 +16,7 @@ const fmdxList = require('./fmdx_list');
|
||||
|
||||
// Endpoints
|
||||
router.get('/', (req, res) => {
|
||||
if(serverConfig.webserver.banlist.includes(req.connection.remoteAddress)) {
|
||||
if(serverConfig.webserver.banlist.includes(req.connection.remoteAddress || req.headers['x-forwarded-for'])) {
|
||||
res.render('403');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ function connectToSerial() {
|
||||
serialport.write('F-1\n');
|
||||
serialport.write('W0\n');
|
||||
serialport.write('D0\n');
|
||||
serialport.write('G11\n');
|
||||
serialport.write('G00\n');
|
||||
serverConfig.audio.startupVolume ? serialport.write('Y' + (serverConfig.audio.startupVolume * 100).toFixed(0) + '\n') : serialport.write('Y100\n');
|
||||
|
||||
serialport.on('data', (data) => {
|
||||
@@ -277,7 +277,7 @@ wss.on('connection', (ws, request) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (command.includes("'")) {
|
||||
if (command.includes("\'")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ function OnPlayButtonClick(_ev) {
|
||||
Stream.Stop();
|
||||
} else {
|
||||
Stream.Start();
|
||||
const $playbutton = $('.playbutton');
|
||||
$playbutton.find('.fa-solid').toggleClass('fa-play fa-stop');
|
||||
$playbutton.addClass('bg-gray').prop('disabled', true);
|
||||
setTimeout(() => {
|
||||
$playbutton.removeClass('bg-gray').prop('disabled', false);
|
||||
}, 3000);
|
||||
const $playbutton = $('.playbutton');
|
||||
$playbutton.find('.fa-solid').toggleClass('fa-play fa-stop');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var currentDate = new Date('April 6, 2024 01:00:00');
|
||||
var currentDate = new Date('April 22, 2024 22:00:00');
|
||||
var day = currentDate.getDate();
|
||||
var month = currentDate.getMonth() + 1; // Months are zero-indexed, so add 1
|
||||
var year = currentDate.getFullYear();
|
||||
var formattedDate = day + '/' + month + '/' + year;
|
||||
var currentVersion = 'v1.1.9b [' + formattedDate + ']';
|
||||
var currentVersion = 'v1.1.9c [' + formattedDate + ']';
|
||||
|
||||
getInitialSettings();
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<th>IP Address</th>
|
||||
<th>Location</th>
|
||||
<th>Online since</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -68,11 +69,12 @@
|
||||
<td><%= user.ip %></td>
|
||||
<td><%= user.location %></td>
|
||||
<td><%= user.time %></td>
|
||||
<td><a href="./kick?user=<% user.ip %>">Kick</a></td>
|
||||
</tr>
|
||||
<% }); %>
|
||||
<% } else { %>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center">No users online</td>
|
||||
<td colspan="4" style="text-align: center">No users online</td>
|
||||
</tr>
|
||||
<% } %>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user