aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/plugin-index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/plugins/plugin-index.ts')
-rw-r--r--server/lib/plugins/plugin-index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/plugins/plugin-index.ts b/server/lib/plugins/plugin-index.ts
index 170f0c7e2..7bcb6ed4c 100644
--- a/server/lib/plugins/plugin-index.ts
+++ b/server/lib/plugins/plugin-index.ts
@@ -11,6 +11,7 @@ import { PluginModel } from '../../models/server/plugin'
11import { PluginManager } from './plugin-manager' 11import { PluginManager } from './plugin-manager'
12import { logger } from '../../helpers/logger' 12import { logger } from '../../helpers/logger'
13import { PEERTUBE_VERSION } from '../../initializers/constants' 13import { PEERTUBE_VERSION } from '../../initializers/constants'
14import { sanitizeUrl } from '@server/helpers/core-utils'
14 15
15async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) { 16async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) {
16 const { start = 0, count = 20, search, sort = 'npmName', pluginType } = options 17 const { start = 0, count = 20, search, sort = 'npmName', pluginType } = options
@@ -55,7 +56,7 @@ async function getLatestPluginsVersion (npmNames: string[]): Promise<PeertubePlu
55 currentPeerTubeEngine: PEERTUBE_VERSION 56 currentPeerTubeEngine: PEERTUBE_VERSION
56 } 57 }
57 58
58 const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins/latest-version' 59 const uri = sanitizeUrl(CONFIG.PLUGINS.INDEX.URL) + '/api/v1/plugins/latest-version'
59 60
60 const { body } = await doRequest<any>({ uri, body: bodyRequest, json: true, method: 'POST' }) 61 const { body } = await doRequest<any>({ uri, body: bodyRequest, json: true, method: 'POST' })
61 62