diff options
Diffstat (limited to 'server/controllers/api/oauth-clients.ts')
-rw-r--r-- | server/controllers/api/oauth-clients.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/controllers/api/oauth-clients.ts b/server/controllers/api/oauth-clients.ts index c21e2298d..48a10d31f 100644 --- a/server/controllers/api/oauth-clients.ts +++ b/server/controllers/api/oauth-clients.ts | |||
@@ -24,7 +24,10 @@ async function getLocalClient (req: express.Request, res: express.Response, next | |||
24 | // Don't make this check if this is a test instance | 24 | // Don't make this check if this is a test instance |
25 | 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) | 26 | logger.info('Getting client tokens for host %s is forbidden (expected %s).', req.get('host'), headerHostShouldBe) |
27 | return res.type('json').status(HttpStatusCode.FORBIDDEN_403).end() | 27 | return res.fail({ |
28 | status: HttpStatusCode.FORBIDDEN_403, | ||
29 | message: `Getting client tokens for host ${req.get('host')} is forbidden` | ||
30 | }) | ||
28 | } | 31 | } |
29 | 32 | ||
30 | const client = await OAuthClientModel.loadFirstClient() | 33 | const client = await OAuthClientModel.loadFirstClient() |