diff --git a/server/datahandler.js b/server/datahandler.js
index 819283d..dfa03fd 100644
--- a/server/datahandler.js
+++ b/server/datahandler.js
@@ -31,16 +31,16 @@ var dataToSend = {
agc: 0,
ant: 0,
txInfo: {
- tx: '',
- pol: '',
- erp: '',
+ tx: '', // Name
+ pol: '', // Polarisation
+ erp: '', // Power
city: '',
- itu: '',
- dist: '',
- azi: '',
- id: '',
+ itu: '', // Country
+ dist: '', // Distance
+ azi: '', // Azimuth
+ id: 0, // Some number
reg: false,
- pi: '',
+ pi: '', // PI
},
country_name: '',
country_iso: 'UN',
diff --git a/server/endpoints.js b/server/endpoints.js
index a4179b5..4748904 100644
--- a/server/endpoints.js
+++ b/server/endpoints.js
@@ -24,10 +24,11 @@ router.get('/', (req, res) => {
const normalizedIp = requestIp?.replace(/^::ffff:/, '');
const ipList = (normalizedIp || '').split(',').map(ip => ip.trim()).filter(Boolean); // in case there are multiple IPs (proxy), we need to check all of them
- const isBanned = ipList.some(ip => serverConfig.webserver.banlist.some(banEntry => banEntry[0] === ip));
+ const banEntry = serverConfig.webserver.banlist.find(banEntry => ipList.includes(banEntry[0]));
- if (isBanned) {
- res.render('403');
+ if (banEntry) {
+ const reason = banEntry[3];
+ res.render('403', { reason });
logInfo(`Web client (${normalizedIp}) is banned`);
return;
}
diff --git a/web/403.ejs b/web/403.ejs
index b4c3fbb..2e388b7 100644
--- a/web/403.ejs
+++ b/web/403.ejs
@@ -24,9 +24,9 @@
There's a possibility you were kicked by the system.
Please try again later.
Reason: too dig of a bick
- <% } %> + <% if (reason) { %> +Reason: <%= reason %>
+ <% } %>