aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/v1/users.js')
-rw-r--r--server/controllers/api/v1/users.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/controllers/api/v1/users.js b/server/controllers/api/v1/users.js
index 1125b9faa..0584d5cdf 100644
--- a/server/controllers/api/v1/users.js
+++ b/server/controllers/api/v1/users.js
@@ -20,14 +20,14 @@ module.exports = router
20// --------------------------------------------------------------------------- 20// ---------------------------------------------------------------------------
21 21
22function getAngularClient (req, res, next) { 22function getAngularClient (req, res, next) {
23 const server_host = config.get('webserver.host') 23 const serverHost = config.get('webserver.host')
24 const server_port = config.get('webserver.port') 24 const serverPort = config.get('webserver.port')
25 let header_host_should_be = server_host 25 let headerHostShouldBe = serverHost
26 if (server_port !== 80 && server_port !== 443) { 26 if (serverPort !== 80 && serverPort !== 443) {
27 header_host_should_be += ':' + server_port 27 headerHostShouldBe += ':' + serverPort
28 } 28 }
29 29
30 if (req.get('host') !== header_host_should_be) return res.type('json').status(403).end() 30 if (req.get('host') !== headerHostShouldBe) return res.type('json').status(403).end()
31 31
32 Users.getFirstClient(function (err, client) { 32 Users.getFirstClient(function (err, client) {
33 if (err) return next(err) 33 if (err) return next(err)