import express from 'express'
+import { isTestOrDevInstance } from '@server/helpers/core-utils'
import { OAuthClientModel } from '@server/models/oauth/oauth-client'
import { HttpStatusCode, OAuthClientLocal } from '@shared/models'
import { logger } from '../../helpers/logger'
}
// Don't make this check if this is a test instance
- if (process.env.NODE_ENV !== 'test' && req.get('host') !== headerHostShouldBe) {
+ if (!isTestOrDevInstance() && req.get('host') !== headerHostShouldBe) {
logger.info('Getting client tokens for host %s is forbidden (expected %s).', req.get('host'), headerHostShouldBe)
return res.fail({
status: HttpStatusCode.FORBIDDEN_403,