]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/pods.ts
Type models
[github/Chocobozzz/PeerTube.git] / server / middlewares / pods.ts
index e405f265ec2dec60d5f5392dc5600368512a6e6c..c255be8998023a7bb8672b1cb8149fe78727c4fb 100644 (file)
@@ -1,6 +1,4 @@
-'use strict'
-
-const constants = require('../initializers/constants')
+import { REMOTE_SCHEME } from '../initializers'
 
 function setBodyHostsPort (req, res, next) {
   if (!req.body.hosts) return next()
@@ -48,7 +46,7 @@ function getHostWithPort (host) {
 
   // The port was not specified
   if (splitted.length === 1) {
-    if (constants.REMOTE_SCHEME.HTTP === 'https') return host + ':443'
+    if (REMOTE_SCHEME.HTTP === 'https') return host + ':443'
 
     return host + ':80'
   }