diff --git a/src/addon/src/serverless.js b/src/addon/src/serverless.js index 95a9b7ec..1fbfd414 100644 --- a/src/addon/src/serverless.js +++ b/src/addon/src/serverless.js @@ -43,7 +43,7 @@ router.get('/:configuration?/:resource/:type/:id/:extra?.json', limiter, (req, r const { configuration, resource, type, id } = req.params; const extra = req.params.extra ? qs.parse(req.url.split('/').pop().slice(0, -5)) : {} const ip = requestIp.getClientIp(req); - const host = `${req.protocol}://${req.headers.host}`; + const host = `${req.protocol}://${req.get('host')}`; console.log(`Host is ${host}`); const configValues = { ...extra, ...parseConfiguration(configuration), id, type, ip, host }; addonInterface.get(resource, type, id, configValues)