improve secret vars and parse url with secrets

This commit is contained in:
seydx
2025-05-20 13:05:11 +02:00
parent 0830d8342e
commit e5e55b7a50
3 changed files with 136 additions and 48 deletions
+7 -1
View File
@@ -4,6 +4,7 @@ import (
"errors"
"strings"
"github.com/AlexxIT/go2rtc/internal/app"
"github.com/AlexxIT/go2rtc/pkg/core"
)
@@ -46,7 +47,8 @@ func GetProducer(url string) (core.Producer, error) {
}
if handler, ok := handlers[scheme]; ok {
return handler(url)
parsedURL := ParseURL(url)
return handler(parsedURL)
}
}
@@ -95,3 +97,7 @@ func GetConsumer(url string) (core.Consumer, func(), error) {
return nil, nil, errors.New("streams: unsupported scheme: " + url)
}
func ParseURL(url string) string {
return app.ResolveSecrets(url)
}