From 6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Apr 2019 11:33:44 +0200 Subject: Move config in its own file --- server/middlewares/validators/follows.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators/follows.ts') diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts index b360cf95e..5623b4ba6 100644 --- a/server/middlewares/validators/follows.ts +++ b/server/middlewares/validators/follows.ts @@ -4,7 +4,7 @@ import { isTestInstance } from '../../helpers/core-utils' import { isEachUniqueHostValid, isHostValid } from '../../helpers/custom-validators/servers' import { logger } from '../../helpers/logger' import { getServerActor } from '../../helpers/utils' -import { CONFIG, SERVER_ACTOR_NAME } from '../../initializers' +import { SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers' import { ActorFollowModel } from '../../models/activitypub/actor-follow' import { areValidationErrors } from './utils' import { ActorModel } from '../../models/activitypub/actor' @@ -16,7 +16,7 @@ const followValidator = [ (req: express.Request, res: express.Response, next: express.NextFunction) => { // Force https if the administrator wants to make friends - if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') { + if (isTestInstance() === false && WEBSERVER.SCHEME === 'http') { return res.status(500) .json({ error: 'Cannot follow on a non HTTPS web server.' -- cgit v1.2.3