aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/pods.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/pods.js')
-rw-r--r--server/middlewares/pods.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/middlewares/pods.js b/server/middlewares/pods.js
index e38fb341d..2647f9ff0 100644
--- a/server/middlewares/pods.js
+++ b/server/middlewares/pods.js
@@ -8,6 +8,8 @@ const podsMiddleware = {
8} 8}
9 9
10function setBodyHostsPort (req, res, next) { 10function setBodyHostsPort (req, res, next) {
11 if (!req.body.hosts) return next()
12
11 for (let i = 0; i < req.body.hosts.length; i++) { 13 for (let i = 0; i < req.body.hosts.length; i++) {
12 const hostWithPort = getHostWithPort(req.body.hosts[i]) 14 const hostWithPort = getHostWithPort(req.body.hosts[i])
13 15
@@ -23,6 +25,8 @@ function setBodyHostsPort (req, res, next) {
23} 25}
24 26
25function setBodyHostPort (req, res, next) { 27function setBodyHostPort (req, res, next) {
28 if (!req.body.host) return next()
29
26 const hostWithPort = getHostWithPort(req.body.host) 30 const hostWithPort = getHostWithPort(req.body.host)
27 31
28 // Problem with the url parsing? 32 // Problem with the url parsing?