X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Ffollows.ts;h=5623b4ba65cecb7d33d318048474b18df6c8785d;hb=6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0;hp=b360cf95ee0656a8227e613a32b6ccf0b0db490f;hpb=14893eb71cb2d4ca47e07589c81958863603aba4;p=github%2FChocobozzz%2FPeerTube.git 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.'