mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-29 12:04:02 -06:00
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
@ -27,7 +27,10 @@ function getAngularClient (req, res, next) {
|
|||||||
headerHostShouldBe += ':' + serverPort
|
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) {
|
Client.loadFirstClient(function (err, client) {
|
||||||
if (err) return next(err)
|
if (err) return next(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user