ActivityPub-federated video streaming platform using P2P directly in your web browser
Server: add log messages if the server refuses to serve local clients tokens
Chocobozzzb1233aa856d9
diff --git a/server/controllers/api/clients.js b/server/controllers/api/clients.jsindex b013541958..7755f6c2ba 100644--- 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 instanceif (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()}