]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/follows.ts
Move config in its own file
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / follows.ts
index b360cf95ee0656a8227e613a32b6ccf0b0db490f..5623b4ba65cecb7d33d318048474b18df6c8785d 100644 (file)
@@ -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.'