@tiledesk/tiledesk-server 2.3.11 → 2.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/app.js +2 -1
  2. package/package.json +1 -1
package/app.js CHANGED
@@ -175,6 +175,7 @@ if (process.env.CREATE_INITIAL_DATA !== "false") {
175
175
 
176
176
 
177
177
 
178
+
178
179
  var app = express();
179
180
 
180
181
 
@@ -340,7 +341,7 @@ function customDetection (req) {
340
341
  // const ip = (req.headers['x-forwarded-for'] || '').split(',').pop().trim() || //https://stackoverflow.com/questions/8107856/how-to-determine-a-users-ip-address-in-node
341
342
  // req.socket.remoteAddress
342
343
 
343
- const ip = (req) =>
344
+ const ip =
344
345
  req.headers['x-forwarded-for']?.split(',').shift()
345
346
  || req.socket?.remoteAddress
346
347
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-server",
3
3
  "description": "The Tiledesk server module",
4
- "version": "2.3.11",
4
+ "version": "2.3.12",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",