diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-05-22 20:58:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-05-25 17:32:16 +0200 |
commit | e02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch) | |
tree | b7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/middlewares/pods.ts | |
parent | 65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff) | |
download | PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip |
Type models
Diffstat (limited to 'server/middlewares/pods.ts')
-rw-r--r-- | server/middlewares/pods.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/middlewares/pods.ts b/server/middlewares/pods.ts index e405f265e..c255be899 100644 --- a/server/middlewares/pods.ts +++ b/server/middlewares/pods.ts | |||
@@ -1,6 +1,4 @@ | |||
1 | 'use strict' | 1 | import { REMOTE_SCHEME } from '../initializers' |
2 | |||
3 | const constants = require('../initializers/constants') | ||
4 | 2 | ||
5 | function setBodyHostsPort (req, res, next) { | 3 | function setBodyHostsPort (req, res, next) { |
6 | if (!req.body.hosts) return next() | 4 | if (!req.body.hosts) return next() |
@@ -48,7 +46,7 @@ function getHostWithPort (host) { | |||
48 | 46 | ||
49 | // The port was not specified | 47 | // The port was not specified |
50 | if (splitted.length === 1) { | 48 | if (splitted.length === 1) { |
51 | if (constants.REMOTE_SCHEME.HTTP === 'https') return host + ':443' | 49 | if (REMOTE_SCHEME.HTTP === 'https') return host + ':443' |
52 | 50 | ||
53 | return host + ':80' | 51 | return host + ':80' |
54 | } | 52 | } |