@vulkano/core 1.17.3 → 1.17.4

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.
@@ -1,3 +1,5 @@
1
+ const path = require('path');
2
+
1
3
  const merge = require('../libs/Merge');
2
4
 
3
5
  module.exports = function getExpressConfiguration() {
@@ -49,7 +51,7 @@ module.exports = function getExpressConfiguration() {
49
51
  sockets: {},
50
52
  redis: {},
51
53
  multer: {
52
- dest: 'public/files'
54
+ dest: global.PUBLIC_PATH ? path.join(global.PUBLIC_PATH, 'files') : 'public/files'
53
55
  },
54
56
  morgan: {
55
57
  format: 'dev',
@@ -191,7 +191,8 @@ module.exports = function loadServer() {
191
191
 
192
192
  vulkano.use( (req, res, next) => {
193
193
  if (req.timedout) {
194
- return res.status(503).json({ success: false, statusCode: 503, error: { detail: 'Request timeout' } });
194
+ res.status(503).json({ success: false, statusCode: 503, error: { detail: 'Request timeout' } });
195
+ return;
195
196
  }
196
197
  next();
197
198
  });
@@ -663,7 +664,8 @@ module.exports = function loadServer() {
663
664
 
664
665
  // Timeout — always respond with JSON regardless of request type
665
666
  if (req.timedout || (err && err.timeout)) {
666
- return res.status(503).json({ success: false, statusCode: 503, error: { detail: 'Request timeout' } });
667
+ res.status(503).json({ success: false, statusCode: 503, error: { detail: 'Request timeout' } });
668
+ return;
667
669
  }
668
670
 
669
671
  const status = err ? (err.status || 500) : (res.statusCode || 500);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulkano/core",
3
- "version": "1.17.3",
3
+ "version": "1.17.4",
4
4
  "description": "A MVC framework using Express 4",
5
5
  "license": "MIT",
6
6
  "author": "Vulkano Team",