Using getBaseStaticRoute for index.html urls.
This commit is contained in:
parent
2a8df1dc3c
commit
d4b8c8b2e2
@ -5,9 +5,9 @@
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="description" content="Converse XMPP/Jabber Chat"/>
|
||||
<link type="text/css" rel="stylesheet" media="screen" href="{{BASE_STATIC_URL}}/conversejs/converse.min.css" />
|
||||
<script type="text/javaScript" src="{{BASE_STATIC_URL}}/conversejs/converse.min.js"></script>
|
||||
<script type="text/javascript" src="{{BASE_STATIC_URL}}/static/builtin.js"></script>
|
||||
<link type="text/css" rel="stylesheet" media="screen" href="{{BASE_STATIC_URL}}conversejs/converse.min.css" />
|
||||
<script type="text/javaScript" src="{{BASE_STATIC_URL}}conversejs/converse.min.js"></script>
|
||||
<script type="text/javascript" src="{{BASE_STATIC_URL}}static/builtin.js"></script>
|
||||
<style type="text/css">
|
||||
body.livechat-iframe #conversejs .chat-head {
|
||||
display: none;
|
||||
@ -20,7 +20,7 @@
|
||||
<script type="text/javascript">
|
||||
initConverse({
|
||||
jid: '{{JID}}',
|
||||
assetsPath : '{{BASE_STATIC_URL}}/conversejs/',
|
||||
assetsPath : '{{BASE_STATIC_URL}}conversejs/',
|
||||
room: '{{ROOM}}',
|
||||
boshServiceUrl: '{{BOSH_SERVICE_URL}}',
|
||||
websocketServiceUrl: '{{WS_SERVICE_URL}}',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Router, RequestHandler, Request, Response, NextFunction } from 'express'
|
||||
import type { ProxyOptions } from 'express-http-proxy'
|
||||
import { getBaseRouterRoute } from '../helpers'
|
||||
import { getBaseRouterRoute, getBaseStaticRoute } from '../helpers'
|
||||
import { asyncMiddleware } from '../middlewares/async'
|
||||
import { getProsodyDomain } from '../prosody/config/domain'
|
||||
import * as path from 'path'
|
||||
@ -72,9 +72,8 @@ async function initWebchatRouter (options: RegisterServerOptions): Promise<Route
|
||||
}
|
||||
|
||||
let page = '' + (converseJSIndex as string)
|
||||
// FIXME: Peertube should provide the static folder path. For now:
|
||||
const staticRelative = '../../../static'
|
||||
page = page.replace(/{{BASE_STATIC_URL}}/g, staticRelative)
|
||||
const baseStaticUrl = getBaseStaticRoute(options)
|
||||
page = page.replace(/{{BASE_STATIC_URL}}/g, baseStaticUrl)
|
||||
page = page.replace(/{{JID}}/g, server)
|
||||
room = room.replace(/{{VIDEO_UUID}}/g, video.uuid)
|
||||
page = page.replace(/{{ROOM}}/g, room)
|
||||
|
Loading…
x
Reference in New Issue
Block a user