+ private static addServerConfig (htmlStringPage: string, serverConfig: HTMLServerConfig) {
+ // Stringify the JSON object, and then stringify the string object so we can inject it into the HTML
+ const serverConfigString = JSON.stringify(JSON.stringify(serverConfig))
+ const configScriptTag = `<script type="application/javascript">window.PeerTubeServerConfig = ${serverConfigString}</script>`
+
+ return htmlStringPage.replace(CUSTOM_HTML_TAG_COMMENTS.SERVER_CONFIG, configScriptTag)
+ }
+