projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b08096
)
Server: add log messages if the server refuses to serve local clients tokens
author
Chocobozzz
<florian.bigard@gmail.com>
Tue, 1 Nov 2016 18:14:33 +0000
(19:14 +0100)
committer
Chocobozzz
<florian.bigard@gmail.com>
Tue, 1 Nov 2016 18:14:33 +0000
(19:14 +0100)
server/controllers/api/clients.js
patch
|
blob
|
history
diff --git
a/server/controllers/api/clients.js
b/server/controllers/api/clients.js
index b0135419588ba0b3a15759d26c9c1b2facb4bb8e..7755f6c2ba4a37e6e635557eb152c5ef76c01d2e 100644
(file)
--- a/
server/controllers/api/clients.js
+++ b/
server/controllers/api/clients.js
@@
-4,6
+4,7
@@
const express = require('express')
const mongoose = require('mongoose')
const constants = require('../../initializers/constants')
+const logger = require('../../helpers/logger')
const Client = mongoose.model('OAuthClient')
@@
-22,6
+23,7
@@
function getLocalClient (req, res, next) {
// Don't make this check if this is a test instance
if (process.env.NODE_ENV !== 'test' && req.get('host') !== headerHostShouldBe) {
+ logger.info('Getting client tokens for host %s is forbidden (expected %s).', req.get('host'), headerHostShouldBe)
return res.type('json').status(403).end()
}