aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/controllers/api/clients.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/controllers/api/clients.js b/server/controllers/api/clients.js
index b01354195..7755f6c2b 100644
--- a/server/controllers/api/clients.js
+++ b/server/controllers/api/clients.js
@@ -4,6 +4,7 @@ const express = require('express')
4const mongoose = require('mongoose') 4const mongoose = require('mongoose')
5 5
6const constants = require('../../initializers/constants') 6const constants = require('../../initializers/constants')
7const logger = require('../../helpers/logger')
7 8
8const Client = mongoose.model('OAuthClient') 9const Client = mongoose.model('OAuthClient')
9 10
@@ -22,6 +23,7 @@ function getLocalClient (req, res, next) {
22 23
23 // Don't make this check if this is a test instance 24 // Don't make this check if this is a test instance
24 if (process.env.NODE_ENV !== 'test' && req.get('host') !== headerHostShouldBe) { 25 if (process.env.NODE_ENV !== 'test' && req.get('host') !== headerHostShouldBe) {
26 logger.info('Getting client tokens for host %s is forbidden (expected %s).', req.get('host'), headerHostShouldBe)
25 return res.type('json').status(403).end() 27 return res.type('json').status(403).end()
26 } 28 }
27 29