remult 0.14.17 → 0.14.19
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.
- package/esm/remult-middleware.js +4 -1
- package/package.json +1 -1
- package/remult-middleware.js +4 -1
package/esm/remult-middleware.js
CHANGED
|
@@ -38,7 +38,10 @@ class middleware {
|
|
|
38
38
|
return route;
|
|
39
39
|
}
|
|
40
40
|
handleRequest(req, res, next) {
|
|
41
|
-
|
|
41
|
+
let theUrl = req.url;
|
|
42
|
+
if (theUrl.startsWith('/')) //next sends a partial url '/api/tasks' and not the full url
|
|
43
|
+
theUrl = 'http:' + theUrl;
|
|
44
|
+
const url = new URL(theUrl);
|
|
42
45
|
const path = url.pathname;
|
|
43
46
|
if (!req.query) {
|
|
44
47
|
let query = {};
|
package/package.json
CHANGED
package/remult-middleware.js
CHANGED
|
@@ -42,7 +42,10 @@ var middleware = /** @class */ (function () {
|
|
|
42
42
|
return route;
|
|
43
43
|
};
|
|
44
44
|
middleware.prototype.handleRequest = function (req, res, next) {
|
|
45
|
-
var
|
|
45
|
+
var theUrl = req.url;
|
|
46
|
+
if (theUrl.startsWith('/')) //next sends a partial url '/api/tasks' and not the full url
|
|
47
|
+
theUrl = 'http:' + theUrl;
|
|
48
|
+
var url = new URL(theUrl);
|
|
46
49
|
var path = url.pathname;
|
|
47
50
|
if (!req.query) {
|
|
48
51
|
var query_1 = {};
|