+ async getIndexHTMLConfig (options: OverrideCommandOptions = {}) {
+ const text = await this.getRequestText({
+ ...options,
+
+ path: '/',
+ implicitToken: false,
+ defaultExpectedStatus: HttpStatusCode.OK_200
+ })
+
+ const match = text.match('<script type="application/javascript">window.PeerTubeServerConfig = (".+?")</script>')
+
+ // We parse the string twice, first to extract the string and then to extract the JSON
+ return JSON.parse(JSON.parse(match[1])) as ServerConfig
+ }
+