From 173828717668e4851420070abcdf781382c7eace Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Wed, 30 Jan 2019 03:06:46 -0500 Subject: [PATCH] fix(url): invalid parse --- src/controllers/tickets.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/tickets.js b/src/controllers/tickets.js index c4ad961d4..efd262113 100644 --- a/src/controllers/tickets.js +++ b/src/controllers/tickets.js @@ -91,7 +91,13 @@ ticketsController.getByStatus = function (req, res, next) { status: [] } - var pathname = url.URL(req.url).pathname + var fullUrl = url.format({ + protocol: req.protocol, + host: req.get('host'), + pathname: req.originalUrl + }) + + var pathname = new url.URL(fullUrl).pathname var arr = pathname.split('/') var tType = 'new' var s = 0