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.
@@ -38,7 +38,10 @@ class middleware {
38
38
  return route;
39
39
  }
40
40
  handleRequest(req, res, next) {
41
- const url = new URL(req.url);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.14.17",
3
+ "version": "0.14.19",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -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 url = new URL(req.url);
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 = {};