feat: pre-load ElfHosted MediaFlow Proxy config URL

This commit is contained in:
WebStreamr 2025-06-24 19:27:01 +00:00
parent 39dec26450
commit 9e2242093c
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('elfhosted.com')) {
config.mediaFlowProxyUrl = `${req.protocol}://${req.host.replace('webstreamr', 'mediaflow-proxy')}`;
}
const manifest = buildManifest(this.sources, config);
res.setHeader('content-type', 'text/html');