- refactor secrets

- add support for env in config
- redact sensitive information in logs/responses
This commit is contained in:
seydx
2025-05-26 21:56:45 +02:00
parent e8e798d955
commit bf45f64a7e
14 changed files with 202 additions and 160 deletions
-13
View File
@@ -4,7 +4,6 @@ import (
"errors"
"strings"
"github.com/AlexxIT/go2rtc/internal/app"
"github.com/AlexxIT/go2rtc/pkg/core"
)
@@ -47,18 +46,6 @@ func GetProducer(url string) (core.Producer, error) {
}
if handler, ok := handlers[scheme]; ok {
index := strings.IndexByte(url, '#')
if index > 0 {
_, query := url[:index], ParseQuery(url[index+1:])
secretsName := query.Get("secrets")
if secretsName != "" {
secrets := app.GetSecret(secretsName)
if secrets != nil {
url = secrets.Parse(url)
}
}
}
return handler(url)
}
}