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:
parent
9c89a45cb2
commit
441b66f809
3 changed files with 15 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue