]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.js
Server: forbid to make friends with a non https server
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.js
index c808aff5f58ee06f9316dbdd6ebfb0fa0ef8e978..3ddf87454e0e234ffaf3215cfd6c2fa0f088c9c1 100644 (file)
@@ -14,7 +14,7 @@ const PAGINATION_COUNT_DEFAULT = 15
 
 // Sortable columns per schema
 const SEARCHABLE_COLUMNS = {
-  VIDEOS: [ 'name', 'magnetUri', 'podUrl', 'author', 'tags' ]
+  VIDEOS: [ 'name', 'magnetUri', 'podHost', 'author', 'tags' ]
 }
 
 // Sortable columns per schema
@@ -55,6 +55,7 @@ const CONFIG = {
   }
 }
 CONFIG.WEBSERVER.URL = CONFIG.WEBSERVER.SCHEME + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT
+CONFIG.WEBSERVER.HOST = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT
 
 // ---------------------------------------------------------------------------
 
@@ -103,6 +104,22 @@ const MONGO_MIGRATION_SCRIPTS = [
   {
     script: '0020-requests-endpoint',
     version: 20
+  },
+  {
+    script: '0025-video-filenames',
+    version: 25
+  },
+  {
+    script: '0030-video-magnet',
+    version: 30
+  },
+  {
+    script: '0035-url-to-host',
+    version: 35
+  },
+  {
+    script: '0040-video-remote-id',
+    version: 40
   }
 ]
 const LAST_MONGO_SCHEMA_VERSION = (maxBy(MONGO_MIGRATION_SCRIPTS, 'version'))['version']
@@ -135,7 +152,7 @@ const REQUEST_ENDPOINTS = {
 
 const REMOTE_SCHEME = {
   HTTP: 'https',
-  WS: 'WS'
+  WS: 'wss'
 }
 
 // Password encryption
@@ -203,6 +220,7 @@ module.exports = {
 
 // ---------------------------------------------------------------------------
 
+// This method exists in utils module but we want to let the constants module independent
 function isTestInstance () {
   return (process.env.NODE_ENV === 'test')
 }