1
0
Fork 0

Server: Don't make the host url check for client credentials if this is a test instance

This commit is contained in:
Chocobozzz 2016-07-19 16:44:15 +02:00
parent 1a42c9e2c0
commit f9f5478ca0

View file

@ -27,7 +27,10 @@ function getAngularClient (req, res, next) {
headerHostShouldBe += ':' + serverPort
}
if (req.get('host') !== headerHostShouldBe) return res.type('json').status(403).end()
// Don't make this check if this is a test instance
if (process.env.NODE_ENV !== 'test' && req.get('host') !== headerHostShouldBe) {
return res.type('json').status(403).end()
}
Client.loadFirstClient(function (err, client) {
if (err) return next(err)