diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/v1/users.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/controllers/api/v1/users.js b/server/controllers/api/v1/users.js index dde459a73..3f8d8ad92 100644 --- a/server/controllers/api/v1/users.js +++ b/server/controllers/api/v1/users.js | |||
@@ -27,7 +27,10 @@ function getAngularClient (req, res, next) { | |||
27 | headerHostShouldBe += ':' + serverPort | 27 | headerHostShouldBe += ':' + serverPort |
28 | } | 28 | } |
29 | 29 | ||
30 | if (req.get('host') !== headerHostShouldBe) return res.type('json').status(403).end() | 30 | // Don't make this check if this is a test instance |
31 | if (process.env.NODE_ENV !== 'test' && req.get('host') !== headerHostShouldBe) { | ||
32 | return res.type('json').status(403).end() | ||
33 | } | ||
31 | 34 | ||
32 | Client.loadFirstClient(function (err, client) { | 35 | Client.loadFirstClient(function (err, client) { |
33 | if (err) return next(err) | 36 | if (err) return next(err) |