feat: pre-load ElfHosted Media Flow Proxy config URL

This commit is contained in:
WebStreamr 2025-06-24 19:27:01 +00:00
parent 0c85632209
commit b0d7fc1680
No known key found for this signature in database

View file

@ -21,6 +21,11 @@ export class ConfigureController {
private getConfigure(req: Request, res: Response) {
const config: Config = JSON.parse(req.params['config'] || JSON.stringify(getDefaultConfig()));
// Convenience preset for ElfHosted WebStreamr bundle including Media Flow Proxy
if (!req.params['config'] && req.host.endsWith('herndl.org')) {
config.mediaFlowProxyUrl = `${req.protocol}://${req.host.replace('webstreamr', 'mediaflow-proxy')}`;
}
const manifest = buildManifest(this.sources, config);
res.setHeader('content-type', 'text/html');