1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Server: forbid to make friends with a non https server

This commit is contained in:
Chocobozzz 2016-11-16 20:22:17 +01:00
parent 9c89a45cb2
commit 441b66f809
3 changed files with 15 additions and 2 deletions

View file

@ -6,7 +6,8 @@ const logger = require('./logger')
const utils = {
cleanForExit,
generateRandomString
generateRandomString,
isTestInstance
}
function generateRandomString (size, callback) {
@ -22,6 +23,10 @@ function cleanForExit (webtorrentProcess) {
process.kill(-webtorrentProcess.pid)
}
function isTestInstance () {
return (process.env.NODE_ENV === 'test')
}
// ---------------------------------------------------------------------------
module.exports = utils