diff --git a/src/app.ts b/src/app.ts index c5a4a68..b9e05f4 100644 --- a/src/app.ts +++ b/src/app.ts @@ -108,10 +108,11 @@ app.use(CaptainConstants.netDataRelativePath, function(req, res, next) { req.originalUrl.indexOf(CaptainConstants.netDataRelativePath + '/') !== 0 ) { - let isRequestSsl = req.secure || req.get('X-Forwarded-Proto') === 'https' + let isRequestSsl = + req.secure || req.get('X-Forwarded-Proto') === 'https' let newUrl = - (isRequestSsl? 'https://' : 'http://') + + (isRequestSsl ? 'https://' : 'http://') + req.get('host') + CaptainConstants.netDataRelativePath + '/'