Server: Don't make the host url check for client credentials if this is a test instance
This commit is contained in:
parent
1a42c9e2c0
commit
f9f5478ca0
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue